The lower town of Smyrna, with the harbour and sea-castle, was under the control of the Hospitallers on behalf of the Papacy. The upper town with its fortress was under Ottoman control. In 1400–02, Timur attacked the Ottoman Empire and invaded Anatolia. With the Ottomans utterly defeated and the sultan captured at the Battle of Ankara, he turned on Smyrna. Although the defences had been greatly improved in a series of projects going back to 1392, Íñigo had only 200 knights under his command. The siege began on 2 December 1402, and they resisted for two weeks before the walls were breached. At least some of the Hospitallers, Íñigo included, reached their ships and managed to escape, while the population was slaughtered.