Answer
In the wake of his crushing defeat at the hands of the Russian forces led by Peter the Great in the Battle of Poltava in 1709, Charles XII sought refuge in the Ottoman Empire, where he remained in exile for five years. During his stay, he forged an alliance with the Ottoman Sultan, Ahmet III, and attempted to enlist Ottoman support in his efforts to regain his lost territories.