Between 4000 BBY and some point millennia before the Imperial Era, the Gungan tribes of the planet Naboo engaged in war with each other. The Gungan Boss Gallo eventually united the tribes under one banner through diplomatic and military means. Using a massive Gungan army, Gallo attacked the city Spearhead, which was the home of the rogue warlord Boss Rogoe and the other Gungan holdouts. The destruction of Spearhead ended the war, and Gallo founded the united Gungan capital Otoh Gunga on Spearhead's foundations.
Behind the scenes
The war between the Gungans was first mentioned in canon in Nexus of Power, a 2016 sourcebook published by Fantasy Flight Games for the Star Wars: Force and Destiny roleplaying game. In the Star Wars Legends continuity, the war between the Gungans was first mentioned in Star Wars: Galactic Battlegrounds: Prima's Official Strategy Guide by Steven L. Kent, released on November 7, 2001, before appearing in the LucasArts video game Star Wars: Galactic Battlegrounds, released on November 11 the same year.