The mission period was ended in 1768 by a decree of Charles III of Spain. In 1821, the Mexican War of Independence between Mexico and Spain came to an end and the territory of New Spain, which included Arizona, was ceded to Mexico.