The USS Premonition (NX-4612 or NX-80189) was a Federation Starfleet starship fitted with a temporal drive, which travelled back to 2376 from an alternate future in which much of the United Federation of Planets and the Alpha Quadrant had fallen to a Borg Invasion. Captain Thaddius Deming hoped to warn the Federation of the coming invasion in time to prevent the Borg victory; with the help of Captain Jean-Luc Picard of the USS Enterprise, and after making two further temporal incursions the Premonition's mission was a success and she returned to the future.
In the USS Premonition's native timeline the Borg Invasion of 2376 had decimated the Alpha Quadrant; Earth, Vulcan, Qo'noS and Bajor had all been assimilated, leaving the Federation all but destroyed. Captain Thaddius Deming utilised the Premonition's temporal drive to open a temporal gate and travel back to before the Borg Invasion, hoping to stop it ever happening. Two Spheres pursued the ship through the temporal gate.
The Premonition arrived in the Barisa sector in 2376, just an hour before the Borg attack on Starbase 612 that signified the start of the invasion. The two Borg spheres attacked the Premonition Captain Demming sent out a distress call, which was answered by the crew of the USS Enterprise-E and the USS Jupiter, who were in the sector helping to establishing a new outpost and defending it from the last remains of the Dominion Invasion. The spheres were destroyed and the Premonition was saved, despite its engines and weapons being disabled.
Captain Demming hailed the Enterprise and was astounded to be greeted by the "legendary" Captain Picard. He warned Picard of the invasion, and that their first attack on Starbase 612 was imminent. Picard was initially hesitant; reminding Demming of Starfleet regulations in regard to time travel, but Demming was insistent, describing to Picard the extent of the damage about to be done by the Borg. Picard cooperated, and sent a message to Starfleet Command informing them of the situation, while taking the Enterprise to Starbase 612 in readiness for the warned Borg attack.
The Enterprise reached Starbase 612, but not before the first wave of Borg attacks had decimated the area. Fortunately the Enterprise did arrive in time to re-secure the starbase and defend it from a second wave of Borg attacks. Demming was gratified that the base had been saved, but the Enterprise's intervention was insufficient, the Borg invasion, led by a newly cloned Locutus, marched ahead and progressed all the way to Earth. With the assimilation of Earth imminent, Demming turned in desperation to time travel once again, and used the Premonition's temporal drive to generate a temporal gate to send the Enterprise back in time and prevent the Borg from disrupting peace talks which could have brought Klingon and Romulan reinforcements to defend Earth. The Premonition was in this timeline destroyed or assimilated by the Borg as they succeeded in assimilating Earth.
The Enterprise succeeded in saving Ambassador Spock's ship from being destroyed by the Borg, and defending the peace talks, and arrived at Earth with a fleet of Klingon and Romulan vessels ready to repel the Borg. With this assistance the Borg were defeated before they could assimilate Earth. The temporally displaced Enterprise sent the Premonition coordinates to send the current Enterprise back in time, to complete the causality loop.
A Federation strike force, lead by Picard, Worf, Chancellor Martok and Admiral Sela, then infiltrated Unimatrix 01 to destroy the Borg's Omega containment center, and with it the omega particle at the heart of the Borg staging grounds. When the strike force arrived back after a successful mission, they disappeared. The Borg had sent a sphere back in time, during the battle just after Locutus' Cube was destroyed, to 2364 to destroy the Enterprise-E's predecessor, the USS Enterprise-D and with it Picard, Worf and Natasha Yar before they influenced future events. Since the Premonition was from a different time frame, it was unaffected, and travelled back to destroy the sphere before it could destroy the Enterprise, thus restoring the original timeline. The Premonition briefly returned to 2376 to check it had been successful and then travelled forward once more to its era of origin, having successfully stopped the Borg. (TNG video game: Armada)