In 1864, during the French intervention in Mexico, the capital and much of the country was controlled by the foreign invaders, with Juárez's republican government on the run in northern Mexico. In Mexico City Maximilian I was installed as emperor. He took up residence in Chapultepec Castle with his wife Empress Carlota. Modernizing the capital was part of a more general reform program to modernize the country. These included the building of infrastructure to improve domestic communications, including roads and railroads. One such project type was the creation of a series of boulevards, imitating European ones such as the Ringstraße in Vienna, or the ones under construction at that time in Paris under Napoleon III, lined with grand monuments.