The Castilian legal code called the Siete Partidas, compiled during the reign of King Alfonso X, allowed Muslims to continue to practice their religion while transferring their mosques to the Crown. In this document, the Sunni Breviary, the Muslim scholar and judge Ice de Gebir gives a set of guidelines for mudejars setting out how they should practice Islam under the pressure to convert and assimilate. The end came in the 1490s when King Ferdinand and Queen Isabella besieged Granada, capital of the last remaining Muslim kingdom in Iberia. With their own army disbanded, Iberian Muslims looked to the Ottoman sultan Bayezid II to come to their aid. And, if anyone arrived who showed by his diet or speech or in any other way that he clung to the rites of the Holy Roman Catholic Church, he would be scorned and ridiculeds of obligation.