Ferdinand VII became king after the victorious end of the Peninsular War, which freed Spain from Napoleonic domination. When he returned on 24 March 1814 from exile in France, the Cortes requested that he respect the liberal Constitution of 1812, which seriously limited royal powers. Ferdinand refused and went to Valencia instead of Madrid. Here, on 17 April, General Elio invited the King to reclaim his absolute rights and put his troops at the King's disposition. The king abolished the Constitution of 1812 and dissolved the two chambers of the Spanish Parliament on 10 May. Thus began six years (1814–1820) of absolutist rule, but the constitution was reinstated during the Trienio Liberal, a period of three years of liberal government in Spain from 1820 to 1823.