In the beginning of the 13th century Esztergom was the center of the country's political and economic life. This is explained by the canon of Nagyvárad, Rogerius of Apulia, who witnessed the first devastation of the country during the Tatar invasion siege of Esztergom and wrote in his Carmen Miserabile ("Sad Song"): "since there was no other town like Esztergom in Hungary, the Tatars (siege of Esztergom) were considering crossing the Danube to pitch a camp there", which was exactly what happened after the Danube froze. The capital of the Árpád-age was destroyed in a vicious battle. Though, according to the documents that remained intact, some of the residents (those who escaped into the castle) survived and new residents settled in the area and soon started rebuilding the town, it lost its leading role. Béla IV gave the palace and castle to the archbishop, and changed his residence to Buda. Béla IV and his family, however, were buried in the Franciscan church in Esztergom which had been destroyed during the invasion and which had been rebuilt by Béla IV in 1270.