Although Adal was a tributary of Ethiopia, the sultanate, under command of general Ahmad ibn Ibrahim al-Ghazi and with the support of the Ottoman Empire and other Muslim peoples in the region, invaded Ethiopia in 1531. The subsequent war continued until 1543, during which time most of Ethiopia was conquered. It was only with the help of the Portuguese Empire and Cristóvão da Gama that Ethiopia was able to reclaim its lost territory and win the war. However, both the Christian and Muslim regions of Ethiopia were significantly weakened by the war; this has been suggested as a possible factor of the Oromo migrations of the 16th century. From political, religious and cultural perspectives, the mid-16th century signifies the shift from the Middle Ages to the early modern period.