After the Russians had defeated the Swedes and the pro-Swedish Empire Ukrainian Cossacks led by Ivan Mazepa in the Battle of Poltava in 1709, Charles XII of Sweden managed to persuade the Ottoman Sultan Ahmed III to declare war on Russia on November 20, 1710. The Prut campaign of Peter the Great ended very unsuccessfully for Russia. The Russian army, led by the tsar, was surrounded by a superior Turkish-Tatar army and was forced to agree to unfavorable peace conditions, according to which it returned the previously captured Azov to the Ottoman Empire.