After the end of the American Civil War, President Andrew Johnson invoked the Monroe Doctrine and recognized the Juarez government as the legitimate government of Mexico. The United States applied increasing diplomatic pressure to persuade Napoleon III to end French support of Maximilian and to withdraw French troops from Mexico. Washington began supplying partisans of Juárez and his ally Porfirio Díaz by "losing" arms depots to them at El Paso del Norte at the Mexican border. The prospect of an American invasion to reinstate Juárez caused a large number of Maximilian's loyal adherents to abandon his cause and leave the capital.