 On 7 March 1820, as consequence of the liberal revolution in Spain, Constitution of Cadiz was restored and the viceroyalty finally disappeared on May 31, 1820 to be sworn by the viceroy.The county councils were then established in the Interior Provinces.In 1819, the Adams-Onís Treaty was ratified between Spain and the United States of America, which set the limit of the Interior Provinces with the latter country, confirming the Spanish possession from Texas and to the Oregon Territory and Nootka.