The Thousand-Yahren War was the conflict between the Cylon Empire and the Twelve Colonies. Five hundred yahren into the War was when the Colonials developed the first battlestars; of these original five hundred battlestars, only six would survive till the end of the conflict.
The Thousand-Yahren War ended with the Battle of Cimtar; Count Baltar, a Colonial double-agent for the Cylons, tricked President Adar into believing the Cylons wished to negotiate a truce; it was a ruse, and while a force of one thousand Raiders destroyed four of the last five battlestars (including Adar's Atlantia), the basestar fleet destroyed the Twelve Colonies.
The remaining fleet of 220 civilian ships were escorted to safety by the battlestar Galactica.