In 2268 the USS Enterprise discovered an asteroid on a collision course a planet inhabited by a primitive Humanoid species. Although it was located half a galaxy away from Earth, on beaming down the landing party found the locals to be a mixture of Navaho, Mohican and Delaware Indians from the planet Earth! They also discovered a strange artefact on the surface, near to one of the tribes. It was constructed of alloys which resisted sensor scans, and was obviously well beyond the technological capabilities of the planet's inhabitants.
Whilst investigating the structure, Captain Kirk was injured in an accident which caused severe amnesia. With time a critical factor in diverting the asteroid, the rest of the landing party departed in the Enterprise to continue with their mission.
Unfortunately the Enterprise was unable to deflect the approaching menace, which was almost as large as Earth's moon and travelling at enormous velocity. The ship was crippled in the attempt, and limped back to the planet on impulse drive only hours ahead of the danger.
It took nearly sixty days for the ship to arrive back at the planet. During this time Captain Kirk largely integrated himself into the local Indian culture. They had legends which indicated that their people had been transplanted to the planet by an ancient species; the legend claimed that if danger ever threatened from the skies, a God would come forth who would be able to use the artefact to save them. They chose to believe that Kirk was this deity, a role he accepted due to his continuing amnesia.1
As the asteroid approached Kirk tried to use his Godhood to activate the artefact, but was unable to do so. Fortunately when the Enterprise officers beamed down shortly before the impact, Commander Spock was able to translate some of the symbols found on its exterior surface. Using these he gained access to the device and activated it. The artefact emitted a beam of tremendous power, knocking the asteroid safely away from the planet.
The power of this cannon can hardly be overestimated. An asteroid of this size masses in excess of 1022 kg, and this one was travelling at a significant fraction of light speed. The kinetic energy of such a body approaches 1039 Joules, tens of millions of times the energy required to completely destroy a class M planet. Yet the cannon, which apparently worked on some form of deflector principle, was able to effect a radical change in the course of this body in a matter of seconds.
Many questions remain regarding this device, the mysterious "Preserver" species which apparently constructed it, and even the asteroid which it deflected. It is difficult to imagine how a body the size of a large moon could have been accelerated to such enormous velocity in the first place; virtually no known natural phenomena are so energetic. It is conceivable that a Praxis-style dilithium explosion could do it, but such are extremely rare.
The power system of the deflector cannon is a mystery which has resisted all investigation. It is unlikely to be a matter/antimatter reactor, unless a significant fraction of the entire mass of the planet is used as fuel! Zero point energy is a possibility, but the power source could equally be some far more exotic technology.
The Preservers themselves remain largely a mystery, although they were apparently active until perhaps as later as the 1800s on the Earth calendar. Their actions appear to be one of the reasons that there are so many Humanoid species throughout the galaxy, yet frustratingly little has been discovered of them. Some suggest that the Preservers were engaged in a 'proxy war' with another advanced species, each side mounting attacks such as massive asteroidal impacts to destroy the species planted by the other in an attempt to ensure that their own kind of life would become dominant in the long run. Such theories can only be speculation, although they would explain how such a unique asteroid as this one came to exist.1