For a number of centuries Christian and Muslim principalities existed side by side in relative harmony. The Zagwe dynasty was hardly interested in the area beyond Lasta to the south, and Christian Ethiopia had very little to fear from the weak and divided Muslim kingdoms. Only after the rise of the new Solomonic dynasty with Yekune Amlak in 1270 was a new policy of containing the Muslim principalities adopted. Still, the motivation for this policy was to a large extent political and commercial rather than religious. The wars of the thirteenth, fourteenth, and even fifteenth centuries could be considered a struggle for authority, revenue and land between neighboring political units. The idea of a jihad against the Christian Ethiopia began to emerge only at the end of the fifteenth century as a result of the overwhelming success of the wars carried out by the revived Solomonic dynasty against the Muslim principalities in the southern part of the highlands and on the coast. These wars, which may have started from purely political and commercial motives, quickly took on a religious character. The growing frustration and anger of the Muslims coupled with the appearance of the Ottomans in the Red Sea basin (1516) and the introduction of firearms into the area seriously aggravated the situation. Ahmad Gran, a minor chief of the Adal kingdom, provided the needed leadership and the masses of impoverished nomads, given an ideology and reinforced by a small number of Turks armed with firearms, united in a jihad which threatened the existence of Christian Ethiopia in the second quarter of the sixteenth century. Probably only the timely intervention of the Portuguese, who landed a few hundred soldiers carrying firearms at Massawa in 1541, saved Christian Ethiopia. But it was, ironically, the invasion of Ethiopia by the Galla in about the middle of the century which finally ended the Muslim threat. Having invaded the country, the Galla unintentionally came between the Christian and Muslim rivals, gave the Christians a much-needed breathing space, and broke the Muslim attack. Once the drive of the Muslims was broken and the chances for easy loot in the highlands faded away, the nomadic Muslim tribes of the coastal belt returned to their temporarily interrupted internal wars, and the Muslim front threatening Ethiopia disintegrated.