The Ottoman-Persian War of 1821-23 was caused by border disputes between the two powers in present-day Azerbaijan, which Russia incited to put pressure on the Turks. In 1821 the Greek Revolution broke out. The Greeks achieved important victories and liberated important areas.
The Turks overwhelmingly outnumbered the rebels. Nevertheless, until the Dramali campaign, in 1822, they were unable to allocate a particularly large number of men to suppress the revolution.
The reason for this was the Russian threat, but mainly the war against the Persians, known as the Ottoman-Qajar War, by the Persian dynasty of the same name. Exactly taking advantage of the Turkish involvement in Greece and with Russian suggestion and support, the Persians provoked the war with the Turks and moved against them in western Armenia.
The Turks took the initiative and an army of theirs, led by the Pasha of Baghdad, invaded Persian territory. However, the Turks were defeated and the Persians, led by Muhammad Ali Mirza, pursued them as far as Baghdad, which they besieged.
The crucial conflict, however, took place on the Armenian front. At the head of an army of 30,000 Persians was the crown prince Abba Mirza, a great military and political figure in Persia of his time. Opposite the Turks had gathered an imposing force of 50,000 men with the intention of crushing him.
But the opposite happened. The crucial battle was fought near Erzerum (Byzantine Theodosioupoli). There Abbas Mirza managed to crush the Turks although his army was numerically inferior to the opponent. The victory of the Persians is due to the superior training of their army.
After this defeat the Turks were obliged to send reinforcements to the Persian front, reinforcements that could have been sent to Greece.
Although business was halted due to an outbreak of cholera, the two rivals remained facing each other for the next two years when a peace treaty (Treaty of Erzerum) was signed ending the war, without significant territorial changes.