ferdinand and isabella appealed to pope sixtus iv for the creation of a special commission to root out dissidents as they fought to wrest control of spain from the moslems who had ruled nearly half the country for 800 years .