The Taifa of Lisbon lasted until 1034, when the Aftasids conquered Lishbuna. It remained in Aftasid control until 1093, when the Kingdom of León briefly seized Lishbuna. The Almoravid dynasty took control of the city from 1094 to 1141. The instability of the Almoravid kingdom led to the Second Taifa Period. The Wazirids were independent from the Almoravids and controlled the city until 1147 when the Kingdom of Portugal besieged the city from July to October, which marked the end of Muslim control in Central Portugal.