The Siege of Sofia refers to the two sieges of the city that took place in between 1380–1382 during the course of the Bulgarian–Ottoman wars.The Bulgarian defenders,led by Yanuka,repulsed the Ottomans–led by Lala Shahin Pasha– in the first siege.However,the Ottomans would besiege the city again with Ballaban Bey leading them with Lala Shahin Pasha.The Ottomans killed Yanuka and forced the Bulgarians to surrender,thus winning control of the city
In 1373 the Bulgarian emperor Ivan Shishman agreed to become an Ottoman vassal and to marry his sister Kera Tamara to their sultan Murad I, while the Ottomans were to return some conquered fortresses.
First siege
Despite the peace, in the beginning of the 1380s the Ottomans resumed their campaigns and besieged the important city of Sofia which controlled major communication routes to Serbia and Macedonia. There are little records about the siege. After the futile attempts to storm the city, the Ottoman commander Lala Shahin Pasha considered to abandon the siege. All attacks led by the Ottomans were repelled by Yanuka.
Second siege
In 1382 a Bulgarian renegade called Usunca Syondök managed to lure the city governor ban Yanuka out of the fortress to hunt and the Turks, led by Ince Balaban bey, captured him. Leaderless, the Bulgarians surrendered. The city walls were destroyed and an Ottoman garrison was installed. With the way to the north-west cleared, the Ottomans pressed further and captured Pirot and Niš in 1386, thus wedging between Bulgaria and Serbia.
After the capture of the city, Sofia became a sanjak. Ince Balaban who has also been referred to as 'the conqueror of Sofia', became its first sanjakbey.