In the course of the First Balkan War, the Army of Thessaly overcame the fortified Ottoman positions along the border in the Battle of Sarantaporo and advanced north. Despite a setback of a detached division in the Battle of Sorovich, the main army broke through the Ottoman defences at the Battle of Yenidje, forcing, after a few days, the surrender of Thessaloniki and its garrison. Having effected the union with the allied Serbian and Bulgarian armies, the Army of Thessaly was deactivated, with some units going to reinforce the Epirus front and others settling along the new demarcation line in Macedonia.