In 1862, Napoleon III sent troops to Mexico in an effort to establish an allied monarchy in the Americas, with Archduke Ferdinand Maximilian of Austria enthroned as Emperor Maximilian I. The Second Mexican Empire faced resistance from the republican government of President Benito Juárez, however. After victory in the American Civil War in 1865, the United States made clear that France would have to leave. It sent 50,000 troops under General Philip H. Sheridan to the Mexico–United States border and helped resupply Juárez. Napoleon's military was stretched very thin; he had committed 40,000 troops to Mexico, 20,000 to Rome to guard the Pope against the Italians, as well as another 80,000 in restive Algeria. Furthermore, Prussia, having just defeated Austria in the Austro-Prussian War of 1866, was an imminent threat. Napoleon realised his predicament and withdrew his troops from Mexico in 1866. Maximilian was overthrown and executed.