James T. Kirk/Starfleet career/V'ger crisis

In the mid-2270s, V'ger, an energy cloud assimilating information from (and destroying) objects in its path, threatened Earth. The only starship positioned to intercept it was the Enterprise, her refit nearly complete but still awaiting trial runs. After convincing Admiral Nogura that he was the best man to meet the threat, Kirk rushed the Enterprise into service, assuming the rank of captain for the duration of the mission. Decker regarded Kirk's command as an insult and a mistake and pointed to his recent desk service and unfamiliarity with the ship's new systems, but the younger man fulfilled his duty as first officer. 
The entity proved to be the late 20th century NASA space probe Voyager 6, having amassed great power and self-awareness in its travels. When Kirk and his party discovered the true nature of V'ger and negotiated a visit to the actual probe itself, located at the heart of the 'V'ger' vessel, Decker used the opportunity, with V'gers protection, to fulfill his wish to merge with the V'ger entity through the simulacrum of his lover Ilia, thereby uniting V'gers mechanical nature with its Human origins. The union resulted in the birth of a radically new, and benign, lifeform. ()
Following the success of this mission, Kirk commanded the Enterprise in the mid-to-late 2270s. His quarters were on deck 5.