Shafirov concluded the Peace of the Pruth during the campaign of 1711. Peter left him in the hands of the Turks as a hostage, and on the breaking of the peace he was imprisoned in the Seven Towers. Finally, however, with the aid of the British and Dutch ambassadors, he won the diplomacy of Charles XII of Sweden and his agents, and confirmed the good relations between Russia and Turkey by the treaty of Adrianople (June 1713).