Moors began a westerly expansion across the southern sections of the Mediterranean Sea during the second half of the 7th century. By 711, the Umayyads claimed most of the Iberian Peninsula. This city was given the name Mālaqah. Control seesawed among Muslim dynasties for over 780 years until the collapse of the Nasrids and their Emirate of Granada in 1492. This event marked the end of the Reconquista and established Christian dominance. A significant timeframe for Málaga was from 1026 until 1279. During this period, rule over the city changed hands several times between isolated Moorish kingdoms (a tafia) and the Almoravids, a powerful Berber Muslim dynasty. In 1026, Yahya I al-Mu’tali of the Hammudid dynasty established the First Taifa of Málaga and declared it his capital. In 1057, Málaga was seized by Badis ibn Habús, the king of the Taifa of Granada. He immediately ordered the construction of a formidable fortress to protect his acquisition. This resulted in the initial construction of the Alcazaba from 1057 through 1063. Each conquering dynasty of Málaga – Almoravids in 1092, Almohads in 1146 and Nasrids in 1279 – reshaped and strengthened the Muslim fortification.