The break-up of Al-Andalus into the competing taifa kingdoms helped the long embattled Iberian Christian kingdoms gain the initiative. The capture of the strategically central city of Toledo in 1085 marked a significant shift in the balance of power in favour of the Christian kingdoms. Following a great Muslim resurgence in the 12th century, the great Moorish strongholds in the south fell to Castile in the 13th century—Córdoba in 1236 and Seville in 1248. The County of Barcelona and the Kingdom of Aragon entered in a dynastic union and gained territory and power in the Mediterranean. In 1229 Majorca was conquered, so was Valencia in 1238. In the 13th and 14th centuries, the Marinid dynasty of Morocco invaded and established some enclaves on the southern coast but failed in their attempt to re-establish North African rule in Iberia and were soon driven out.