On May 31, 1863, during the French intervention, President Benito Juárez told Congress that the government had to leave Mexico City. He left that night with his family, his cabinet and deputies. The government set up in San Luis Potosí, then in Saltillo and Monterrey, then in Chihuahua and Paso del Norte. (Video in Spanish.)
INEHRM, the government’s institute for historical studies, calls this period la República itinerante, the itinerant republic. In 1865, the seat of government moved between Chihuahua and Paso del Norte, depending on the movements of the enemy. Juárez entered Mexico City again on July 15, 1867.