Whale Probe crisis

An alien probe threatens Earth in search of humpback whales

The 2286 crisis in which a vast alien probe crippled Earth while calling for humpback whales, ended when Kirk's crew brought two whales from the past.

The Whale Probe crisis took place in 2286, when an enormous cylindrical probe of unknown origin approached Earth broadcasting a powerful signal. Every ship it passed lost power, and once it entered orbit it began disrupting Earth's atmosphere and evaporating the oceans, threatening to destroy the planet's climate. Starfleet issued a planetary distress signal warning ships away.
In Star Trek IV: The Voyage Home, the former crew of the Enterprise is returning to Earth aboard a captured Klingon Bird-of-Prey to face trial. Spock recognises the signal as the song of humpback whales, a species extinct by the 23rd century, and realises the probe will continue until its call is answered. The crew travel back to San Francisco in 1986, where they find two whales, George and Gracie, with help from the marine biologist Gillian Taylor.
They bring the whales forward in time, and the probe departs once the whales reply. In gratitude, the charges against the crew are largely dropped, Kirk is reduced to captain, and he is given command of the new Enterprise-A.