The Ottomans were employed as mercenaries by the Byzantines in the 1340s but later became invaders in their own right. Sultan Murad I took Adrianople from the Byzantines in 1362; Sofia fell in 1382, followed by Shumen in 1388. The Ottomans completed their conquest of Bulgarian lands in 1393 when Tarnovo was sacked after a three-month siege and the Battle of Nicopolis which brought about the fall of the Vidin Tsardom in 1396. Sozopol was the last Bulgarian settlement to fall, in 1453. The Bulgarian nobility was subsequently eliminated and the peasantry was enserfed to Ottoman masters, while much of the educated clergy fled to other countries.