Ivan was the crown prince of Vasili III, the Rurikid ruler of the Grand Duchy of Moscow, and was appointed Grand Prince at three years-old after his father's death. Ivan was proclaimed Tsar (Emperor) of All Rus' in 1547 at the age of seventeen, establishing the Tsardom of Russia with Moscow as the predominant state. Ivan's reign was characterized by Russia's transformation from a medieval state into an empire under the Tsar, though at immense cost to its people and its broader, long-term economy. Ivan conquered the Khanates of Kazan, Astrakhan and Sibir, with Russia becoming a multiethnic and multicontinental state spanning approximately 4,050,000 km2 (1,560,000 sq mi), developing a bureaucracy to administer the new territories. Ivan triggered the Livonian War, which ravaged Russia and resulted in the loss of Livonia and Ingria, but allowed him to exercise greater autocratic control over Russia's nobility, whom he violently purged in the Oprichnina. Ivan was an able diplomat, a patron of arts and trade, and the founder of Russia's first publishing house, the Moscow Print Yard. Ivan was popular among Russia's commoners (see Ivan the Terrible in Russian folklore) except for the people of Novgorod and surrounding areas who were subject to the Massacre of Novgorod.