The Grand Prince of Kiev, Roman the Great, united the principalities of Halych and Volhynia into a single state at the turn of the 13th century. Following the destruction wreaked by the Mongol invasion of Kievan Rus' (1239 to 1241), Prince Danylo Romanovych was forced to pledge allegiance to Batu Khan of the Golden Horde in 1246 as other princes of Rus did. He strove to rid his realm of the Mongol yoke, by formally drawing closer to Western Europe, however when Batu Khan ordered him to destroy city walls of his eastern cities he did so. He was crowned "Rex Rusiae" by a papal legate in 1253, becoming officially an Orthodox subject of the Vatican. He also unsuccessfully attempted to establish military alliances with other European rulers. The Polish conquest of the kingdom in 1349 ended its vassalage to the Golden Horde but it also ended its autonomy; the principality of Galicia was fully absorbed by Catholic Poland. Upon annexing it, Polish King Casimir III the Great adopted the title of King of Poland and ruler of Ruthenia, and the territory was transformed into the Province of Ruthenia () in 1434.