John I (John Zapolya)zäˈpôlyŏ, 1487–1540, king of Hungary (1526–40), voivode [governor] of Transylvania (1511–26). He was born John Zapolya, the son of Stephen Zápolya. The leader of the antiforeign party of the Hungarian nobles, he secured a decree at the diet of 1505 by which no foreign ruler would be chosen king of Hungary after the death of the ruling king, Uladislaus II. To strengthen his own candidacy for the crown he sought to marry the king's daughter, Anna, but his suit was rejected and he was removed from the court through his appointment as voivode of Transylvania. He ruthlessly crushed a peasant uprising in 1514. His anger at the marriage of Anna to Ferdinand of Austria (later Holy Roman Emperor Ferdinand I) probably motivated his failure to assist Uladislaus' son, King Louis II of Hungary, at the battle of Mohács (1526). Louis II was killed in the battle. John was crowned king by the Hungarian nobles, but Ferdinand claimed the crown on the basis of his marriage with Anna as well as previous agreements. In 1527, Ferdinand defeated John and was crowned by John's opponents. John retired to his stronghold in the Carpathians. In 1529 the Ottomans began to overrun Hungary. John now descended upon and defeated Ferdinand's army and, after surrendering the crown to Sultan Sulayman I, was confirmed king by the sultan, who exercised real control. The struggle between John and Ferdinand ended in 1538, when John, who was then childless, agreed that the crown should pass to Ferdinand after his death. John set aside the agreement when, a few months before his death, a son, John Sigismund (John II), was born.