The Guardian of Forever was a portal-like device used for viewing the past and for traveling through time. It was constructed at least six billion years ago by an unknown race on a planet in the Beta Quadrant, within Federation space. It was operated by an advanced artificial intelligence.
- The planet that the Guardian of Forever is located on has different names in different books. This may be due to the fact the existence of the Guardian is a highly classified secret, and so the planet doesn't have an official designation. The Last Unicorn RPG module: All Our Yesterdays: The Time Travel Sourcebook claims the Guardian was created eight billion years ago.
History of the Guardian
When built, the timeline of the Guardian's builders was left inaccessible through the portal. Whether that was an accidental omission or a deliberate choice, as a means to protect their own history, was unknown. (TAS - Log One novelization: Yesteryear)
Two million years ago, a young Q encountered the Guardian, which resulted in his meeting the malevolent extra-dimensional entity known as 0. One million years ago, 0 used the Guardian to bring other entities like itself into the Universe. (TNG novels: Q-Space, Q-Zone)
Discovery by the Federation
The Federation's first contact with the Guardian of Forever was made in 2267 by Captain James T. Kirk of the USS Enterprise. Doctor Leonard McCoy, suffering from cordrazine-induced madness, fled through the Guardian to 1930. Kirk and Spock followed him and succeeded in preventing him from altering history, but at the cost of the life of Edith Keeler, with whom Kirk had fallen in love. The incident made a profound emotional impact on Kirk. (TOS episode: "The City on the Edge of Forever")
Following its discovery, Federation researchers investigated the possibility of removing the Guardian from its planet to "The Yard", a secret Starfleet facility. This, however, proved not to be a practical option, and all study was conducted on the Guardian's planet. It had become something of an unofficial "Eighth Wonder." (TOS - Constellations short story: "Devices and Desires")
The deposed dictator from Oorego IV named Trengur was attempting to flee from the Enterprise in 2267. Trengur landed on the planet with the Guardian and traveled to Earth in the year 218 BC and was able to alter history by interfering with Hannibal's campaign against Rome. Kirk, Spock and McCoy were sent by the Guardian to the same time-frame in order to repair the damage. (TOS comic: "No Time Like the Past")
In 2269, Spock assisted a team of historians at Oyya, the original name for the ruins on planet Gateway. During that assignment, Spock found that history had been altered so that he had died as a child. He used the Guardian of Forever to travel to 2237 and save the life of his younger self. (TAS episode & novelization: Yesteryear)
Later that year, Spock gained permission to use the Guardian of Forever to visit Sarpeidon's past and bring his son Zar home with him. However, circumstances necessitated Zar returning to his own place in space and time. (TOS novel: Yesterday's Son)
While unable to gleam much of the Guardian's inner workings, the Federation was able to extract enough that they applied it to their prototype cloaking device. (TOS - Year Four: The Enterprise Experiment comics: "Part 1", "Part 2")
It was shortly after this that the Federation set up the Ellison Research Outpost on Gateway to study the Guardian and the timeline.
In 2373, Special Agents Dulmer and Gariff Lucsly of the Federation Department of Temporal Investigations used the Guardian of Forever to visit Earth in 2063 and 1996 to follow up on recent temporal incursions by the USS Enterprise-E and the USS Voyager. (VOY short story: "Almost... But Not Quite")
During the Dominion War, around 2374, Roga Danar was recruited by Section 31 to prevent the Dominion from seizing the Guardian. After completing his mission, Roga asked the Guardian what it desired. When it said that it wanted freedom, Roga granted it permission to leave Gateway, which it did. (DS9 - Strange New Worlds 9 short story: "Orphans")
By the year 2409, a mysterious unmentioned quarantine was lifted on the Gateway planet to allow a Starfleet crew to rescue Miral Paris from B'Vat. B'Vat used the Guardian to travel back to 2270 and the crew followed suit. After fixing B'Vat's temporal incursion, the Guardian returns the crew to their own time. During this time, he also reveals that he knows of the Iconians and that they could not use him the same way as their Iconian gateways. (STO mission: "City on the Edge of Never", STO mission: "Past Imperfect")
- Star Trek Online outright states that, as of 2409, the Guardian has not been used since the Enterprise crew's 2267 encounter.
30th century and beyond
In the 30th century, during the Temporal Wars, many factions tried to use the Guardian of Forever to destroy their enemies. To prevent its power from being abused, the Guardian was forced to go into hiding.
In 3189, the Guardian's location was pinpointed by the computer aboard USS Discovery, which directed Philippa Georgiou and Michael Burnham to Dannus V. Assuming the identity of "Carl", a humanoid male, and disguising its portal as a simple standalone doorway, the Guardian greeted Georgiou and Burnham arrived. It showed a headline that read "Emperor Georgiou Dies Horrible Painful Death" and inferred that the answer to Philippa's condition could be found through the doorway. (DSC episode: "Terra Firma, Part 1")
Seeking to weigh Philippa to see if her time in the primary universe had changed her, the Guardian sent her back to the Mirror universe to when her Michael Burnham had betrayed her. Though Philippa inevitably had to kill her daughter again, the Guardian noted the good she did in saving a Kelpien slave named Saru and her attempt to change the Terran Empire towards peace. Deeming her worthy of being saved, the Guardian revealed its true identity and form, offering to use its power to take the Emperor to a time when the prime universe and mirror universe were still aligned, stabilizing her condition. After allowing Philippa and Michael a last goodbye, the Guardian sent the Emperor through its threshold, before it disappeared once again. (DSC episode: "Terra Firma, Part 2")
Befitting an artificial intelligence, the Guardian, as encountered by Kirk and, later, Spock, spoke dispassionately and logically. It appeared to be ambivalent to changes in the timestream, neither being able to prevent individuals from going back in time using it, or interfering with those who attempted to use it to set the timeline right. It was, however, willing to assist when asked, such as agreeing to replay its images of Earth history in order to allow Spock to more precisely estimate when McCoy arrived in 1930's New York during the Great Depression. (TOS episode: "The City on the Edge of Forever")
Centuries into the future, by the 32nd century, the Guardian seemed to have shifted its neutral stance on interfering with beings manipulating time for selfish benefits. Having seen the violence of the Temporal Wars, the Guardian relegated itself into hiding. Since its exile from its original location, the Guardian took a more human personality, using its avatar "Carl". Through Carl, the Guardian displayed a sense of humor, with a love of speaking in riddles. (DSC episode: "Terra Firma, Part 2")
The Guardian in alternate timelines
- In one alternate timeline, in which Kirk and Spock fail in their mission to prevent McCoy from saving Keeler's life, Chief Engineer Montgomery Scott and Security Officer Michael Jameson travel to 1930 Earth from 2267. Instead, Kirk, distracted by Scott, is killed in the auto accident. This creates another alternate timeline in which Lt. Uhura and Security Officer Worsley travel back in time and join the other four officers to successfully restore history. (TOS short story: "Triptych")
- In another timeline set in the 2260s, the Guardian was used to fix reality when it was discovered that renegades had traveled into the early periods of Klingon history where they prevented the assassination of a key figure. This resulted in the Klingon Confederation being a much more peaceful interstellar state that prized the sciences and worked with the Federation to destroy the Romulan Star Empire after the Romulans launched a sneak attack on them. The crew of the USS Enterprise traveled through the Guardian to return the timeline to its unaltered state. (TOS comic: "Time Crime")
- In another, Kirk (circa 2269) was abducted by Kor, subjected to a Klingon mind sifter, and transported through the Guardian of Forever to 1950s Earth, where he was placed in a mental hospital. Spock was promoted to Captain and spent a year looking for Kirk. (TOS short story: "Mind-Sifter")
- In another, in which Montgomery Scott traveled back in time to rescue James T. Kirk before he was absorbed into the Nexus, the Guinan of that universe consulted the Guardian to determine how to restore the timeline. The Guardian insisted that it was not possible to make all as it must be through him, and told Guinan to look within herself, showing her the Nexus and the multiple facets of herself, revealing the source of her frequent premonitions and helping her understand that Kirk had to be returned to the Nexus to restore history. (Star Trek novel: Engines of Destiny)
- In another, Admiral William T. Riker used the Guardian of Forever in 2408 to travel to 2368 and prevent the murder of Deanna Troi by a time-traveling Sindareen; he was followed by the Data of his time, who believed that Riker's "evidence" that Troi was killed by a time traveler was just circumstantial, but the mission concluded with the Guardian revealing that history had been changed and it had never mentioned this to others because nobody had bothered to ask. Experts in the 25th century theorized its energy source came from the sun, via solar quantum filaments. (TNG novel: Imzadi)
- In another, the Horta become guardians to the Guardian of Forever in 2464. (TOS short story: "Guardians")
- In another, the Guardian was believed destroyed in 2270, along with the orbiting Einstein station, when Captain Korax plunged the IKS Gr'oth directly onto the Guardian's site, believing the temporal energies to be evidence of a Federation super-weapon development site. (TOS novel: Provenance of Shadows) In actuality, however, the Guardian had moved itself through time to the year 2293, in part so it could transport Kirk to Veridian III in 2371 after Kirk avoided being pulled into the Nexus. (TOS novel: The Star to Every Wandering)
- In another, the Guardian was destroyed during the War of the Prophets when Starfleet conducted Operation Guardian with the purpose of altering the timeline to prevent the creation of the red wormhole and the Bajoran Ascendancy. Allied Borg and Federation forces fought the Grigari over the planet and Admiral Kathryn Janeway landed her forces in sight of the Guardian when the Grigari activated a singularity bomb which destroyed the planet and all the fighting forces. (DS9 - Millennium novel: The War of the Prophets)
- In one timeline, there was not a singular Guardian but multiple Guardians of Forever who lived within Oyya. These entities manifested as nine foot tall, crystalline "ghosts" who greeted travellers outside their city and conjured time portals out of "pure matter". By their own account, they had been left behind by "The Ancients" to monitor the flow of time. (TOS comic: "Harlan Ellison's The City on the Edge of Forever, Issue 1")
The novel Preserver suggests that the Preservers may have created the Guardian of Forever as Kirk encounters a massive obelisk which has a Guardian inside.