Ferdinand, the brother of Charles V. and his successor as Emperor, and Zapolya were rivals for the crown of St. Stephen. The first relied upon family compacts, and upon his connection by marriage with King Louis.[273] Zapolya, on the other hand, was supported by a strong party among the nobles, who disliked Ferdinand as a foreigner. Zapolya’s partisans took the initiative, and convened a diet at Tokay, at which he was elected King, and he was duly crowned at Stuhlweissenburg by the Archbishop of Gran. Mary, however, the widowed Queen, with the Palatine Bathory, assembled another diet at Presburg, which declared Zapolya’s election void on the ground that the diet of Tokay had not been summoned by the Palatine, and elected Ferdinand King, who, after defeating his rival at Tokay in 1527, and near Kaschau in the following year, drove him out of the country. Zapolya then threw himself on Solyman’s protection, offering to hold Hungary and Transylvania as his tributary, and a treaty of alliance was signed between them in February 1528. In the following year Solyman invaded Hungary for the third time, and took Buda on September 9. A few days afterwards Zapolya was again installed on the throne by the first lieutenant of the Aga of the Janissaries, and did homage for his kingdom. Leaving a Turkish governor in Buda, the Sultan then marched on Vienna, and besieged it on the 27th, but was obliged to abandon the siege on October 16, in consequence of the lateness of the season and the gallant resistance of the garrison and inhabitants.[274]

In the winter of 1530 Ferdinand’s troops besieged Buda unsuccessfully. In the campaign of 1532 Charles V. came with the forces of the Empire to the assistance of his brother, and Styria and Austria were the seat of war. The Sultan was detained for three weeks before the little town of Güns by the gallantry of the commander Jurischitz, who at last surrendered on honourable terms.[275] The delay, however, prevented the Sultan from accomplishing anything considerable, though his army ravaged Styria and Austria, and penetrated as far as Gratz and Linz.

In June 1533 peace was concluded between Ferdinand and Solyman on the basis of Ferdinand’s retaining what he actually held in Hungary, the Sultan reserving to himself the ratification of any arrangements that Ferdinand and Zapolya might make between themselves.

For some years afterwards Solyman’s attention was devoted to his wars with Persia, and no invasion of Hungary on a large scale occurred; but, notwithstanding the peace, the Pashas of Bosnia and the adjoining districts continued their inroads. To check these incursions Ferdinand, in 1537, assembled at Kaproncza, on the Drave, an army of 16,000 foot and 8,000 horse, under the supreme command of Katzianer. He advanced on Essek, intending to besiege it, but was surrounded by clouds of light cavalry, who cut off his supplies and forced him to retreat. After losing his siege-guns at the passage of the Vouka, he encountered the enemy on December 1, and, after an unsuccessful engagement, fled in the night with some of the other generals. The troops that were left were cut to pieces the next day with their gallant commander, Lodron.[276] Katzianer was accused of causing the disaster by his cowardice, and was thrown into prison at Vienna. He escaped by bribing his gaolers, and fled to one of his castles in Croatia, where he entered into negotiations with the Turks, promising to betray the strong fortress of Kosthanitza. However, his treasonable designs were cut short; Count Nicholas Zriny, during an interview with him at one of his castles, treacherously stabbed him, and despatched him with the assistance of his servants. His body was flung from a window into the castle ditch, and his head was sent to Vienna.

In 1538, under the mediation of Charles V., the treaty of Gross Wardein was concluded between Zapolya and Ferdinand. Zapolya was to retain the title of King during his life with Transylvania and the part of Hungary which was then in his actual possession, on his death his male issue was to succeed to Transylvania only, and by the same treaty both parties united in a league for mutual defence against the Turks.

Zapolya had then neither wife nor child; but he immediately afterwards married Isabella, the King of Poland’s daughter, and, dying in July 1540, left by her a son—John Sigismund—who was born a fortnight before his father’s death.

Ferdinand then claimed that, according to the terms of the treaty, he should be placed in possession of the whole of Hungary; but Isabella, as guardian of her infant son, and the party opposed to Ferdinand, under the leadership of Martinuzzi, Bishop of Gross Wardein, refused to adhere to the treaty, caused the infant to be crowned, and appealed to the Sultan for protection. Ferdinand then entered the country, and besieged Buda, which was relieved by the Pasha of Belgrade.

Solyman again invaded Hungary in 1541. On August 29 his troops occupied the gates of Buda, and he annexed that city to his dominions, making it the seat of a Pashalic, and placing a strong garrison in it. He declared, however, that he held it merely in trust for John Sigismund during his minority, and in the meantime appointed the latter Sanjak-bey of Transylvania, under the regency of Martinuzzi and Petrovich. The House of Zapolya held, in addition to Transylvania, most of the country to the north as far as the river Theiss.

In 1543 Solyman again invaded Hungary, and took the cities of Gran and Stuhlweissenburg, or Alba Regia, the former being the primatial see of Hungary, and the latter the burial-place of her Kings. At the end of 1544, Jerome Adorno, provost of Erlau, was sent by Ferdinand as internuncio to Solyman, with John Maria Malvezzi, a member of a noble family of Bologna, as secretary; but he died shortly after his arrival at Adrianople, in March 1545. Malvezzi, aided by Nicholas Sicco, who was sent by Ferdinand as a new ambassador, and Veltwick, the ambassador of Charles V., then undertook the management of the negotiations, and concluded in November an armistice for eighteen months between Solyman on the one side, and Ferdinand and Charles on the other.[277] This was followed, in June 1547, by a peace for five years, in which the Emperor, the Pope, France, and Venice were included, on the basis of uti possidetis, Ferdinand paying the Sultan 30,000 ducats a year, part of which sum was an equivalent for the territories of some of the nobles, who had formerly adhered to the Turkish side, and had afterwards gone over to Ferdinand, and part was termed by him a present, but was more justly considered by the Turks as tribute for the portion of Hungary which still remained in his possession.

The Sultan’s motive for concluding this treaty was his desire to turn his arms against Persia. Elkass Mirza, a brother of Shah Tahmasp, the reigning monarch, had taken refuge at his court in 1547,[278] and in 1548 Solyman led his troops into Persia, and obtained considerable successes. In the following year Elkass was captured by his brother in an expedition he had undertaken, and was confined in a fortress for the rest of his life.