After the Granada War ended 2 January 1492, the old Muslim-ruled Emirate of Granada became part of the Crown of Castile. The kingdom was the location of a Muslim rebellion in 1499-1501 and after the Muslims were defeated and forcibly converted, a Morisco rebellion in 1568-1571. Following the annexation, The city of Granada, which had been the last center of Muslim power in the Iberian Peninsula, lost its political importance and even much of its economic importance, and entered a long period of decline. The European discovery of America gave preeminence to Seville, the only important inland port, which by the 16th century had become the principal city not only of Andalusia, but of all Spain. Nonetheless, Granada continued to play a significant institutional role: it was one of the seventeen cities with a vote in the Cortes de Castilla, the Granada Cathedral was the seat of an archdiocese and the Royal Chancery of Granada was the highest judicial court for half of the Crown of Castile, equaled only by a corresponding institution in Valladolid.