Abu Abdullah Muhammad ibn Yusuf ibn Nasr (Arabic: ) (1195 22 January 1273), also known as Ibn al-Amar (Arabic: , "Ginger") and by his honorific al-Ghalib billah (Arabic: , "The Victor by the Grace of God"), was the first ruler of the Emirate of Granada, the last independent Muslim state on the Iberian Peninsula, and the founder of its ruling Nasrid dynasty. He lived during a time when Iberia's Christian kingdomsespecially Portugal, Castile and Aragonwere expanding at the expense of the Islamic territory in Iberia, called Al-Andalus. Muhammad ibn Yusuf took power in his native Arjona in 1232 when he rebelled against the de facto leader of Al-Andalus, Ibn Hud. During this rebellion, he was able to take control of Crdoba and Seville briefly, before he lost both cities to Ibn Hud. Forced to acknowledge Ibn Hud's suzerainty, Muhammad was able to retain Arjona and Jan. In 1236, he betrayed Ibn Hud by helping Ferdinand III of Castile take Crdoba. In the years that followed, Muhammad was able to gain control over the southern cities, including Granada (1237), Almera (1238) and Mlaga (1239). In 1244, he lost Arjona to Castile. Two years later, in 1246, he agreed to surrender Jan and accept Ferdinand's overlordship in exchange for a 20-year truce.
In the 18 years that followed Muhammad consolidated his domain by maintaining relatively peaceful relations with the Crown of Castile; in 1248 he even helped the Christian kingdom take Seville from the Muslims. But in 1264, he turned against Castile and assisted the unsuccessful rebellion of Castile's newly conquered Muslim subjects. In 1266 his allies in Mlaga, the Banu Ashqilula, rebelled against the emirate. When these former allies sought assistance from Alfonso X of Castile, Muhammad was able to convince the leader of the Castilian troops, Nuo Gonzlez de Lara, to turn against Alfonso. By 1272 Nuo Gonzlez was actively fighting Castile. The emirate's conflict with Castile and the Banu Ashqilula was still unresolved in 1273 when Muhammad died after falling off his horse. He was succeeded by his son, Muhammad II.
The Emirate of Granada which Muhammad founded, and the Nasrid royal house, lasted for two more centuries until it was annexed by Castile in 1492. His other legacy was the construction of the Alhambra, his residence in Granada. His successors would continue to build the palace and fortress complex and reside there, and it has lasted to the present day as the architectural legacy of the emirate.
Arjona is a municipality in the province of Jaén, Andalusia, Spain. It is located 44 kilometres (27 mi) from the provincial capital, Jaén, and 77 kilometres (48 mi) from the city of Córdoba. As of 2017, it had a population of 5,662 and it has an area of 158.45 square kilometres (61.18 sq mi). It belongs to the comarca of Campiña. Its land area is primarily agricultural, with an emphasis on olive trees. Its economy relies primarily on agriculture and olive oil production, but it is also known for its furniture and baking industries. Arjona is known as the birthplace in 1194 of Muhammad I of the Emirate of Granada.