For almost seven hundred years, Spain was the battleground for the opposing forces of the Islamic Caliphate and Western Christian forces. Both Muslims and Christian were motivated by religious conviction, which inspired the warfare. The initial Islamic invasion of Iberia was sudden and unexpected. The varied Moorish tribes of Morocco united under the leadership of Arab generals sent by the reigning Umayyad caliph and crossed the Straits of Gibraltar in 711 under the leadership of the Berber Tariq ibn Ziyad. Tariq won a swift victory at the Guadalete and defeated and killed the reigning Gothic king, Roderic. In a campaign lasting eight years, the whole of Iberia was subjected to Umayyad authority, except for the Asturias mountain range in the far northwest and the pockets of resistance in Navarre. The Islamic offensive ultimately paused after the losses it suffered in Frankland and in the Asturias, where battles such as those at Tours and Covadonga showed some of the potential weaknesses of the Arab methods of warfare.