The Basque districts had managed to retain a virtually independent status (the "fueros", or charters) within the Crown of Castile up until the period of the War of the Pyrenees and the Peninsular War (1793–1813). Traditionally the Basques in Spain ("Kingdom of the Spains") renewed their separate status in a ceremony by which the king of Castile or his viceroy/royal deputy ("regidor") pledged obedience to the native institutions and laws, with the representatives of each district vowing in turn loyalty to him (or her).