The forces of King Ferdinand II of Aragon and Queen Isabella I of Castile fought against the armies of the Muslim Emirate of Granada . The city was captured by the combined forces of Aragon and Castile from the armies of the Muslim Emirate of Granada .