The Treaty of Xàtiva was signed in 1244 between the Christian King James I of Aragon and the Muslim commander Abu Bakr in Xàtiva in the Iberian Peninsula. The treaty laid out generous terms of surrender of the Moors to the Christians, where the Moors were allowed to hold the Xativa Castle for two years before handing it over to the Christian monarchy.