Ahmar established the longest lasting Muslim dynasty on the Iberian peninsula - the Nasrids. The state officially became the Emirate of Granada in 1238. Granada provided connections with the Muslim and Arab trade centers, particularly gold from sub-Saharan Africa, and the Maghreb. The Nasrids also supplied troops for Castile, from the Emirate and mercenaries from North Africa. On Jan. 2, 1492, the last Muslim sultan in Iberia, Emir Muhammad XII, known as Boabdil to the Spanish, surrendered complete control of Emirate of Granada, to Ferdinand II and Isabella I. __