The manoeuvring that saw the gain of Málaga and prevented Castile from taking Algeciras angered both the Marinids and Castile. Both, together with the Banu Ashqilula, attacked Muhammad in 1280. The Marinids and Banu Ashqilula moved towards Málaga, unsuccessfully attacking the region of Marbella in the south. Castile attacked from the north, led by the infante (prince) Sancho (later Sancho IV), son of Alfonso, who was checked by the North African Volunteers of the Faith led by Ibn Muhalli and Tashufin ibn Mu'ti. The Volunteers were a component of Granada's military made up of warriors from North Africa, largely political exiles who migrated with their families and tribes. They still defended Granada against Castile despite Granada also being at war with the Marinid state which they came from. On 23 June, Granadan troops ambushed a large Castilian force at Moclín. In June 1281, Castile invaded again, led by Alfonso himself and accompanied by the Infantes Sancho, Peter and John. They defeated Muhammad in a battle near Granada's walls on 25 June, but after the failure of the negotiations that followed, the Castilians left Granada.