After some time as a prisoner, Charles XII and his soldiers were released when news about the Swedish victory in the Battle of Gadebusch reached the Ottomans. Charles then started to plan his trip back to Sweden.