Between 1130 and his death in 1163, Abd al-Mu'min al-Kumi, a Berber from the Masmuda tribe, defeated the ruling Almoravids and became ruler over all northern Africa as far as Libya. He became Emir of Marrakech in 1149 and conquered Al-Andalus, Moorish Iberia. In 1170 the Almohads transferred their capital to Seville. But by 1212 Muhammad III, "al-Nasir" (1199–1214) was defeated by an alliance of the four Christian princes of Castile, Aragón, Kingdom of Navarre and Portugal, at the Battle of Las Navas de Tolosa in the Sierra Morena. The Almohads lost nearly all of the Moorish dominions in Iberia soon after. The great Moorish cities of Córdoba and Seville fell into Christian possession in the first half of the 13th century. The Almohads continued to rule in Africa for some time, but they lost a lot of their territory. The last representative of the line, Idris II, had only Marrakech left. There he was murdered by a slave in 1269.