A Habsburg–Persian alliance or Hasburg-Safavid alliance was attempted and to a certain extent achieved in the 16th century between the Habsburg Empire and the Safavid Empire in their common conflict against the Ottoman Empire.
During the reign of the Iranian Shah Ismail, exchanges occurred between him and Charles V, and Ludwig II of Hungary in view of combining against the Turks. Charles, then king of Spain as Charles I, sent an envoy to propose an alliance to the Shah of Iran between 1516 and 1519. Also in 1516, Ludwig II sent a Maronite friar by the name of Petrus de Monte Libano with the same mission.
The response to these letters has not been preserved, but in 1523 Shah Ismail sent a letter in Latin offering to Charles V to coordinate military operations against the common Ottoman enemy, again using Petrus of Monte Libano as an emissary. The envoys visited Charles V in Burgos in March 1524 "to ask for an alliance against the Turks". Nothing concrete however seems to have come out of these first exchanges. Charles accepted the alliance in principle, but the death of Shah Ismail in 1524 effectively invalidated the agreement.
Finally, on 18 February 1529, Charles V, deeply alarmed by the Ottoman progression towards Vienna, again sent a letter from Toledo to Shah Ismail, who had died in 1524 and had been replaced by Shah Tahmasp, pleading for a military diversion. His ambassador to the Shah was the knight of Saint John de Balbi, and an alliance was made with the objective of making an attack on the Ottoman Empire in the west and the east within the following year. Tahmasp also responded by expressing his friendship to the Emperor. A decision was thus taken to attack the Ottoman Empire on both fronts, but Balbi took more than one year to return to the Persian Empire, and by that time the situation had changed in Persia, as Persia was forced to make peace with the Ottoman Empire because of an insurrection of the Shaybanid Uzbeks.