Napoleon nearly blundered into war with the United States in 1862. His plan to take control of Mexico in 1861–1867 was a total disaster. The United States forced him to evacuate his army from Mexico, and his puppet Emperor was executed. In 1861, Mexican conservatives looked to Napoleon III to abolish the Republic led by liberal President Benito Juárez. France favored the Confederacy but did not accord it diplomatic recognition. The French expected that a Confederate victory would facilitate French economic dominance in Mexico. he helped The Confederacy by shipping urgently needed supplies through the ports of Matamoros, Mexico, and Brownsville (Texas). The Confederacy itself sought closer relationships with Mexico. Juarez turned it down, but the Confederates worked well with local warlords in northern Mexico, and with the French invaders.