"Kingdom of Valencia" refers to the conquered territory by the Christian Catalan and Aragonese troops commanded by king James I in 1238. The conquered territory was granted wide administrative, legal and political self-government within the structure of the Crown of Aragon as stipulated in the set of laws known first as "Costums de Valencia". When these were transformed into the "Furs of Valencia" (Charters of Valencia), the autonomy was extended to all the Valencian territory. The "furs" (code of law), its administrative and legal structure, as well as its status as an autonomous political entity were dissolved in 1707, at the end of the War of the Spanish Succession by Philip V of Spain, with the promulgation of the Nueva Planta decrees, whereby the legislation and structure of the Kingdom of Castile were instituted in the territory.