Upon Andriamasinavalona's death in 1710, Imerina split into four warring quadrants, and Antananarivo was made the capital of the southern district. During the 77-year civil war that followed, the eastern district's capital at Ambohimanga rose in prominence. The last king of Ambohimanga, Andrianampoinimerina, successfully conquered Antananarivo in 1793; he reunited the provinces of Imerina, ending the civil war. He moved the kingdom's political capital back to Antananarivo in 1794, and declared Ambohimanga the kingdom's spiritual capital, a role it still maintains. Andrianampoinimerina created a large marketplace in Analakely, establishing the city's economic center.