In their final battle with the Borg against Species 8472, the USS Voyager crew was boarded and killed.
With the Voyager's take-over, the Species 8472 learned of another quadrants, named Alpha, Beta and Gamma.
The species headed to those quadrants, destroying everything in their path, including the Borg, the Ferengi, the Breen, even the Dominion. At the end, a joined Cardassian, Romulan, Klingon and Federation fleet were able to stop the invasion, but not before most of the races were destroyed or suffering from many casualties. The war against the Species 8472 was called "The Doomsday War", occurred in the year 2381, and lasted for 3 years.

The year is 2387.
The Species 8472 have colonized the Beta and Gamma quadrants, and have taken over the Worm-Hole.
The Romulan and Cardassian empires, along with minor races that survived, including the Vorta, the Benzites, the Zenkathi, the Caldonians and any other race who hasn't been destroyed,  have joined the Federation as a one big alliance. The Klingons, on the other hand, became independant from the great alliance, which is still called "The United Federation Of Plantes".
Sharing military and scientific resources, the Federation's amin goal is to stop something like "The Doomsday War" from ever happening again.

Star Trek TOS, TNG, DS9 and VGR are the trademarks of Paramount