Thessalonica remained in Ottoman hands until 1403, when Emperor Manuel II sided with Bayezid's eldest son Süleyman in the Ottoman succession struggle that broke out following the crushing defeat of the Ottomans and the capture of Bayezid at the Battle of Ankara against the Turco-Mongol conqueror Timur in 1402. In exchange for his support, by the Treaty of Gallipoli the Byzantine emperor secured, among other concessions, the return of Thessalonica, part of its hinterland, the Chalcidice peninsula, and the coastal region between the rivers Strymon and Pineios.