Esh-kha crusade

Long before the galaxy's species formed independent polities, they belonged to two separate empires ruled by two dominant species: the Rakata, and the Esh-kha. The latter were, like virtually all other sentients in the galaxy, the result of genetic modification at the hands of Rakata scientists. Through causes lost to time, the two empires waged a centuries-long war that ultimately resulted in the Esh-kha's defeat (and subsequently, imprisonment on Belsavis) and much of the Rakata's slave colonies gaining independence through revolt.

History
Centuries, possibly millennia, before the Galactic Republic's formation, a species of warlike humanoids known as the Esh-kha, who were created and once enslaved by the Rakata (as was the case with virtually all sentient humanoid races), launched a crusade across the galaxy, effectively carving out an empire that rivaled that of their former overlords. Eventually, however, as these crusades eventually began reaching the Rakata's slave colonies, the Rakata mobilized their warriors and waged a massive war against the Esh-kha. Lasting centuries, the two empires battled on hundreds of worlds, employing slave species (including Humans, Twi'leks, Bothans, Cathar, among others) in their armies alongside their respective Rakata and Esh-kha warrior castes. During this war, many slave colonies took their opportunity to revolt and began forming independent kingdoms and republics using technology acquired from their defeated masters. Eventually, the Esh-kha were swiftly defeated due to their foes' superior technology, bringing the species to the brink of extinction. Those who survived were captured and were either sacrificed or imprisoned on the slave colony of Belsavis, where they continued to serve the Rakata as slaves until the Rakata themselves were forced into exile millennia later, leaving their thousands of slave colonies including Belsavis to function on their own.

It's speculated by historians that it was during this particular conflict that Human worlds such as Coruscant, Alderaan, and Corellia (all of which former Human slave colonies occupied by the Rakata), gained their independence as kingdoms and republics before eventually uniting under the Galactic Republic. While little is known of the war other than its cause, a few legends revolving around battles in the war, and its impact on the future of the galaxy, it is commonly accepted by historians that had the Esh-kha and the Rakata not crippled eachother's military forces in this centuries-long war, the many other sentient species of the galaxy may have remained in slavery for much longer.