s a city in northern Hungary, 46 kilometres (29 miles) northwest of the capital Budapest. It lies in Komárom-Esztergom county, on the right bank of the river Danube, which forms the border with Slovakia there. Esztergom was the capital of Hungary from the 10th till the mid-13th century when King Béla IV of Hungary moved the royal seat to Buda. Esztergom is the seat of the prímás (see Primate) of the Roman Catholic Church in Hungary, and the former seat of the Constitutional Court of Hungary. The city has the Keresztény Múzeum, the largest ecclesiastical collection in Hungary. Its cathedral, Esztergom Basilica is the largest church in Hungary. Esztergom is one of the oldest towns in Hungary. 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 Esztergomand 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. Following these events, the castle was built and decorated by the bishops. The center of the king’s town, which was surrounded by walls, was still under royal authority. A number of different monasteries did return or settle in the religious center.