The Galaxy-class began development in 2343 and gained the dubious distinction of having the longest design, development and construction period of any class in Starfleet history, with the prototype, USS Galaxy, launching in 2357 and its first two sister ships the USS Enterprise-D and USS Yamato following six years later in 2363. Starfleet initially ordered a total of thirteen Galaxy-class ships. Starfleet decided that seven ships would be completed, with only the frameworks for other six built. These six frameworks were broken down and carried by cargo carriers to remote sites to be held in case a later period of emergency necessitated the completion of these ships.
The emergency came in the form of the Borg at the Battle of Wolf 359 - 39 starships were destroyed. The incident propelled Starfleet into a massive ship design and building program in which the first additional six Galaxy-class and many more after that were constructed to supplement the fleet. While the expected Borg invasion did not come as imminently as expected, the Federation did find itself engaged in war with the Dominion.
In 2370, the Galaxy-class USS Odyssey became one of the first casualties of the Dominion's forces when it was rammed by a Jem'Hadar fighter. During the dominion war, some Galaxy-class starships were refitted with a compliment of (in addition to 450 photon torpedoes) 140 quantum torpedoes. Afterwards, Galaxy-class ships went on to play a major part in numerous engagements in the war.