Following the demise of Galactic Emperor Palpatine during the Battle of Endor, a civil war erupted on Coruscant, the capital of the Galactic Empire. This conflict began when celebratory gatherings transformed into riots due to the Empire's harsh crackdown. Over the subsequent months, several sectors of Coruscant liberated themselves from Imperial control, aided by rebel soldiers, while the Imperial Military, primarily stormtroopers and the Imperial Security Bureau under the leadership of Grand Vizier Mas Amedda, maintained their grip on the governmental areas.
The New Republic established a blockade around the planet, and eventually, combat reached the Federal District. Mas Amedda was initially placed under house arrest within his Imperial Palace residence. After being freed by rebel youths, he officially signed the Empire's surrender via the Galactic Concordance, thus ending the civil war. Amedda was then appointed as a symbolic leader of a provisional government under the supervision of the New Republic.

During a major battle fought on the forest moon of Endor, the Rebel Alliance achieved victory against the Galactic Empire, leading to the destruction of the second Death Star and the deaths of both Emperor Palpatine and his Sith apprentice Darth Vader. Upon learning of the Emperor and Vader's demise, the citizens of Coruscant began celebrating by toppling Palpatine's statues, overwhelming the stormtroopers present on the streets, and launching chimes and fireworks. In response, Coruscant police forces in speeders entered Monument Plaza and, without prior warning, opened fire on the celebrating crowds, resulting in numerous fatalities. This action triggered rioting among the Coruscanti, with some individuals scaling buildings to attack the police speeders. One officer was thrown from his speeder onto the plaza floor, while another was struck in the head by thrown objects. The remaining police speeders retreated as blaster fire and combat erupted across the capital between the Coruscanti and the Imperial security forces.
Amidst the outbreak of fighting, Rorak was killed by Imperial Commander Orkin Kaw. Rorak's son, Jak, motivated by revenge, joined the Anklebiter Brigade, a group of children familiar with the intricate layouts of Galactic City who provided intelligence to Rebel fighters. He then orchestrated the rescue of Lazula, a woman associated with Level 1313 crime lord Talvee Chawin, from police custody to gain the crime lord's favor. Leveraging this favor, Jak arranged for the acquisition of an EMP device, intending to place it at the abandoned Dex's Diner to disable the power grid beneath the Imperial forces battling the Rebels for control of Coco-Town. Jak planned to exploit the power outage and the subsequent Rebel assault as a diversion to assassinate Kaw and avenge his father's death. Ultimately, the Rebels succeeded in capturing Coco Town from the Imperial forces.
In the months that followed, the New Republic was established and the Galactic Senate was re-established on Chandrila. Meanwhile, Coruscant descended into a full-scale civil war, with certain sectors breaking free from Imperial control and their citizens aligning with Rebel resistance fighters, while other sectors actively opposed their neighbors and supported the Imperial forces. As the Empire began to crumble across the galaxy, Grand Vizier Mas Amedda assumed command of Imperial forces on Coruscant. However, the Imperial Navy withdrew its support from the throne world as Fleet Admiral Gallius Rax prevented Grand Admiral [Rae Sloane](/article/rae_sloane], the Navy's figurehead, from sending reinforcements, viewing the planet as part of the decay Rax sought to eliminate to make way for his new vision of the Empire. In this power vacuum, the Imperial Security Bureau was tasked with coordinating Coruscant's Imperial forces, leaving Amedda as an administrator with limited real power beyond Coruscant.
The ISB established a loose blockade around the planet using ISB spaceships and coordinated the efforts of security forces and stormtroopers. Areas containing crucial government buildings, such as the Verity District and the adjacent Federal District, were heavily fortified with checkpoints and barricades manned by stormtroopers, and the area's skylanes were rerouted with ISB craft conducting patrols. While the Federal District remained relatively secure, the other Imperial sectors and fortifications were continuously attacked, with Rebel soldiers and Coruscanti engaging in a guerrilla war against Imperial authorities. Amedda, in his despair and desperation, attempted to surrender himself to New Republic Chancellor Mon Mothma and Princess Leia Organa. However, they refused to take him prisoner, instead urging him to find a way to bring about the Empire's capitulation and sign a complete surrender.
As the fighting intensified, Imperial forces steadily lost ground due to the lack of ongoing support from external Imperial forces. Eventually, the ISB placed Amedda under house arrest within his quarters in the Imperial Palace as the fighting encroached upon the Federal District. A group of youths from the Anklebiter Brigade managed to infiltrate the palace and free Amedda. Having lost all hope of Imperial victory in the wider war, Amedda contacted Mon Mothma.
During the Battle of Jakku, the New Republic engaged and defeated the majority of the Empire's military forces, although sporadic fighting continued for several months. The Galactic Concordance was signed, resulting in the Empire's surrender to the New Republic, with one of the conditions being the handover of Coruscant, the throneworld, to the fledgling galactic government. However, the Senate decided that all worlds should have an equal voice in their government, leading to the rotation of the Republic's capital among member worlds such as Chandrila and Hosnian Prime rather than Coruscant serving as the sole capital. Mas Amedda was appointed as a symbolic head of a provisional government for Coruscant, which was also granted membership in the Galactic Senate.