Polish–Ottoman alliance

A Polish–Ottoman alliance, based on several treaties, occurred during the 16th century between the kingdom of Poland-Lithuania and the Ottoman Empire, as the Ottomans were expanding into Central Europe.

Background
Poland and the Ottoman Empire had been at war since the end of the 15th century following Jagiellonian attempts to take control over Hungary and Bohemia. The Jagiellon king Vladislas II of Hungary was occupying the throne of Hungary and Bohemia. The Jagiellons also allied with Stephen III of Moldavia in 1484-87 to recover territories from the Ottomans, and later invaded Moldavia in 1497.

In 1498, an Ottoman army of 40,000-60,000 under Bali Pasha invaded Poland in the areas of Lesser Poland and Mazovia. Also under pressure from the Russians under Ivan III in Lithuania, the Polish king and the Grand Duke of Lithuania, Alexander I Jagiellon, sought a rapprochement with the Ottomans.

Polish-Ottoman treaties
In 1503, Alexander I signed a five-year treaty with the Ottoman Sultan Bayezid II. Alexander's successor king Sigismund the Old (1506–1548) also signed a treaty with Selim I in 1519 after he had lost Smolensk to the Russians.

After the Ottomans invaded Hungary after the Battle of Mohács in 1526, Poland refrained from interfering with the Ottomans in the southwest. Poland was in fact busy enough countering the Russian threat in Lithuania and Livonia, where it was able to concentrate its forces.

Under Suleiman the Magnificent, two treaties were signed in 1525 and 1528, and a treaty of "perpetual" peace was signed in 1533. The 1533 treaty is thought to have been motivated by the huge progress of the Ottomans in the Siege of Vienna (1529). The treaty was again renewed in 1547.

The treaty was again renewed in 1551 with Sigismund II Augustus, the last Jagiellonian king. As Suleiman was reaching his last years, a treaty was signed in 1564 between Poland and the future Selim II, then still Imperial Prince in charge of the government of Kutahya.

After the death of Sigismund in 1572, Poland elected the French prince, Henry of Valois, rather than Habsburg candidates, partly in order to be more agreeable to the Ottoman Empire. When Henri left to return to France in 1575, he was succeeded by Stephen Báthory of Poland, who also had been supported by the Ottomans in obtaining the Transylvanian throne in 1571.

Unraveling
The "perpetual" peace between Poland and the Ottoman Empire started to crumble in the 1590s. Difficulties arose when Jan Zamoyski took advantage of the Ottoman–Habsburg war in Hungary to invade Moldavia in 1595, in the Moldavian Magnate Wars. The Treaty of Jaruga was signed in 1617, restraining Polish interventions in the Danubian principalities, but open conflict later erupted with the Polish–Ottoman War (1620–1621).