The Long War, also known as the Undine War, was a far-reaching period of conflict, involving the major governmental powers of the galaxy's Alpha and Beta Quadrants. Unrest began between two major powers, the Federation and the Klingon Empire after the Empire chose to invade Gorn space without provocation. The Klingons demanded support from the Federation because the Khitomer Accords mandated their support. Instead the Federation condemned the attack causing the Klingons to withdraw from the Khitomer Accords in 2399, and eventually resulted in the Federation-Klingon War of 2405-2410.
The Long War was fought against various entities, specifically the Undine; who were infiltrating the galaxy through dimensional gates originating in their home realm, fluidic space. They infiltrated the Gorn Hegemony, the Klingon Empire, the Federation, and several other Alpha and Beta Quadrant powers. Their objective was to start a war and eliminate these spacefaring states.
Undine forces eventually invaded both the Alpha and Beta Quadrants. They first attacked the Federation and Klingon Empires, with a diversionary strike on Earth while another force attempted to destroy Qo'Nos the Klingon homeworld, both of which were defeated by combined Federation-Klingon-Romulan forces. Undine forces afterwards attacked various other targets, and deployed Planet Killers against the planets Cardassia Prime, Andoria, Ferenginar, and Gornar. These forces were intercepted by Federation-Klingon-Romulan task forces that were successful in defending those worlds. One such task force was then sent into Fluidic Space, which destroyed the Undine shipyard building the Planet Killers. Afterwards the Undine were involved in the three-sided battle for the Solanae Dyson Sphere.
The Borg also began to make a new push into the Alpha Quadrant. Another splinter faction of the Dominion, the True Way began to attack Starfleet and Cardassian ships alike. Section 31 began many operations during this time, most of which were surprisingly legitimate. The war never had an official ending, although by 2410 most people believed that the Undine infiltrators had either been defeated or had returned to their own dimension. (STO video game: Star Trek Online)
Often seen as a tumultuous era and period of terror that resulted in millions of casualties, the Federation Department of Peace commissioned Jake Sisko and Michael A. Martin to write a living history record of the conflict. The resulting product was a book entitled The Needs of the Many. (STO novel: The Needs of the Many)