Privilege of Buda

The Privilege of Buda (also known as the Treaty of Buda) was a set of promises and concessions made to ensure that Louis I of Hungary would succeed to his uncle Casimir III's Polish throne, thus enabling the union of Hungary and Poland.
Background.
By 1355, the Piast King Casimir III's second marriage, to Adelaide of Hesse, was failing. His only legitimate children, born of his marriage to Aldona of Lithuania, were his two daughters, Duchess Elizabeth of Pomerania and Electress Cunigunde of Brandenburg. Elizabeth and Cunigunde both aspired to the crown; the former in the name of her four-year-old son, Casimir, and the latter for her husband, Elector Louis II. Other candidates were the surviving Piasts, Casimir III's distant agnates: Duke Vladislaus of Gniewkowo and Duke Siemowit III of Masovia. However, the King had arranged to be succeeded, should he himself have no legitimate sons, by either of his sister Elizabeth's sons, King Louis I of Hungary or Duke John of Slavonia. The arrangement was confirmed by the Treaty of Vyšehrad in 1339 and consolidated more clearly in Buda in 1355.
Provisions.
The Privilege recognised the right of the "szlachta" to elect the Polish monarch. Louis solemnly promised that he would not impose any new taxes on the nobility and clergy and that he would not demand any financial support for his court while travelling in Poland.
Despite Casimir III's later inclination to designate his grandson as his heir, Louis ascended the throne of Poland without difficulty on his uncle's death in 1370. He was, however, soon forced to make new concessions to the "szlachta"; he himself had no sons and wished to secure the future accession of one of his daughters by granting the Privilege of Koszyce. 