The last ruler to maintain united state was Mstislav the Great. After his death in 1132 the Kievan Rus' fell into recession and a rapid decline, and Mstislav's successor Yaropolk II of Kiev instead of focussing on the external threat of the Cumans was embroiled in conflicts with the growing power of the Novgorod Republic. In 1169, as the Kievan Rus' state was full of internal conflict, Andrei Bogolyubsky of Vladimir sacked the city of Kiev. The sack of the city fundamentally changed the perception of Kiev and was evidence of the fragmentation of the Kievan Rus'. By the end of the 12th century, the Kievan state became even further fragmented and had been divided into roughly twelve different principalities.