Star Trek: First Contact

Captain Jean Luc Picard awakens from a nightmare where he is reliving his assimilation by the cybernetic Borg six years earlier. He is contacted by Admiral Hayes, who informs him of a new Borg attack against Earth. Picard's orders are for his ship, the USS Enterprise-E, to patrol the Neutral Zone in case of Romulan aggression; Starfleet worries that Picard is too emotionally involved with the Borg because of his past experiences. Learning the fleet is losing the battle, the Enterprise crew disobeys orders and heads for Earth, where a single Borg Cube ship holds its own against a group of Starfleet vessels. The Enterprise saves the crew of the USS Defiant, including Worf, and Picard directs the surviving ships to concentrate their firepower on a single seemingly unimportant point on the Cube. The Cube is destroyed but launches a smaller sphere ship at the last moment. The Enterprise pursues the sphere which approaches Earth and projects a portal, which it enters. As the sphere disappears, the Enterprise discovers Earth has been altered—it is now populated entirely by Borg. Realizing the Borg have gone back in time and changed the past, the Enterprise follows the sphere through the portal.
The Enterprise arrives in the year 2063, one day prior to humanity's first meeting with alien life after Zefram Cochrane's historic warp flight on April 5th; the crew realizes the Borg are trying to stop first contact from occurring. Destroying the Borg sphere, an away team transports down to Montana, the location of Cochrane's Phoenix ship. Cochrane's assistant Lily Sloane fires upon them before collapsing, and Picard has her sent back to the ship for medical attention. The Captain, believing something is wrong on the Enterprise, beams back to the ship, leaving Commander William T. Riker on Earth with an engineering team to make sure the Phoenix' flight proceeds as planned. While in the future Cochrane is seen as a hero, the real man is reluctant to assume the role the Enterprise crew tells him of.
Meanwhile, a group of Borg invade the Enterprise's lower deck and begin to assimilate its crew and modify the ship. Picard and a team attempt to reach engineering in order to disable the Borg with a corrosive gas, but are forced back; the android Data is captured in the melee. Sloane corners Picard with a weapon, but he is able to calm her down. The two escape the Borg-infested area of the ship by creating a diversion in the holodeck. Picard, Worf, and the ship's navigator, Lt. Hawk, venture outside the ship in order to stop the Borg from calling reinforcements. As the Borg continue to assimilate more decks, Worf advises destroying the ship, but Picard angrily calls him a coward and retreats to his ready room. Sloane confronts the captain and causes him to realize he is acting irrationally due to his thirst for revenge. Picard returns to the bridge and orders an activation of the ship's self-destruct while the crew heads for escape pods. The Captain decides to stay behind and rescue his friend Data.
As Cochrane, Riker, and Geordi LaForge prepare to activate the warp drive on the Phoenix, Picard discovers that the Borg Queen has been grafting human skin to Data, allowing him to experience the sensation of touch in order to obtain the android's encryption codes to the Enterprise computer. While Picard offers himself to the Borg in exchange for Data's freedom, Data refuses to leave. He deactivates the self-destruct and on the Queen's orders fires on the Phoenix. At the last moment the torpedoes miss, and the Queen realizes Data betrayed her. The android ruptures a coolant tank, and the corrosive vapor eats away the biological components of the Borg. With the Borg threat neutralized, Cochrane completes his warp flight. The next day the crew watches from a distance as an alien Vulcan ship, attracted by the Phoenix warp test, lands on Earth. Cochrane and Sloane greet the aliens. Having ensured the correction of the timeline, the Enterprise crew slips away and return to the 24th century.