Petty squabbling among the Goa'uld eventually gave way to new leadership headed by Apep, the physically superior son of Atok, who brutally killed publicly the warlord in full view of the other Goa'uld. Instead of claiming the forces of Atok for his own, Apep divided them equally among the strongest Goa'uld and solicited their stewardship. To his underlords, Apep used them to secure the peace, ensuring that no one among them became too powerful.
Apep decreed his Underlords as his brothers and sisters in rulership, although he remained firmly in control. The underlords – Ra, Nut, Thoth and their servants Osiris, Isis, and Bastet – pledged their loyalty, and for a time, a single, united leadership ruled the Goa'uld. Thus united, the symbiotes swept through the galaxy like a plague. Their numbers swelled and the Unas were nearly wiped out – again too many larval Goa'uld were bred. In addition, the life of the Goa'uld was significantly lengthened, creating even more of a population problem. Apep continued the ancient practice of ritual cannibalism. (SG1: "Living Gods: Stargate System Lords")
Apep began to falter as leader of the Goa'uld and demonstrated signs of madness. Anubis was found at Apep's side, becoming the ruler's most trusted and rewarded adviser. His original sons and daughters, including Ra, looked on as Anubis was favored like no other. (SG1: "Living Gods: Stargate System Lords")
Anubis solicited from Apep the secret location of a great cache of Ancients weapons. Secretly, Anubis learned the location by forcibly exposing Apep to Thoth's Sarcophagus, driving the Goa'uld further from sanity.
Determined to rule the Goa'uld, Anubis made his bid for power, utilizing a super weapon, which harnessed enormous amounts of power. Before the other Goa'uld, he forcibly removed Apep's symbiote and devoured it, declaring himself Emperor. Betrayed, the other Goa'uld banded their forces together to defeat Anubis. The battles raged for a hundred years, entire star systems were destroyed and legions of Unas fell in the crossfire. The Goa'uld themselves were nearly eliminated, but eventually defeated Anubis and destroyed his forces. Captured, the Lord of the Dead was banished by the remaining symbiotes. (SG1: "Living Gods: Stargate System Lords")
Ra instituted himself as ruler of the Goa'uld, again taking on the leadership structure originally formed by Apep. Bastet was rewarded for her help against Anubis. Osiris and Isis joined the ranks of the Goa'uld Underlords as well, and Anubis' super weapon was dismantled. Ra took the six crystals that powered the device and divided them amongst the remaining loyal Goa'uld, knowing that his species’ petty bickering would ensure that the weapon was never used again. This ushered in the Second Goa'uld Dynasty. (SG1: "Living Gods: Stargate System Lords")