The first ruler to hold the title of Grand Duke was Mindaugas. Traditionally he is considered the founder of the state, the one who united the Baltic tribes and established the Duchy. Some scholars, however, challenge this perception, arguing that an organized state existed before Mindaugas, possibly as early as 1183. After quelling an internal war with his nephews, Mindaugas was baptized in 1251, and was crowned as King of Lithuania in 1253.
Budapest's recorded history begins with the Roman town of Aquincum, founded around AD 89 on the site of an earlier Celtic settlement near what was to become Óbuda, and from 106 until the end of the 4th century the capital of the province of lower Pannonia. The Hungarians led by Árpád settled in the territory at the end of the 9th century, and a century later officially founded the Kingdom of Hungary. Research places the probable residence of the Árpáds an early place of central power near what became Budapest. The Tatar invasion in the 13th century quickly proved that defence is difficult on a plain. King Béla IV of Hungary therefore ordered the construction of reinforced stone walls around the towns and set his own royal palace on the top of the protecting hills of Buda. In 1361 it became the capital of Hungary.