The mid-19th century saw a number of conflicts, including the Mexican–American War; and two French interventions in Mexico, the first from 1838 to 1839, and the second from 1861 to 1866. The end of the century saw the expulsion of the Spanish from their last major territories on the continent during the Spanish–American War.