In 1861, the government of the vast State of Mexico was centered in Toluca, east of Mexico City. The distance of the capital was one of the reasons why Hidalgo state would eventually separate. When French forces invaded central Mexico in 1862, the large territory of Mexico was divided into three military sectors for defense. The second district had its capital in Actopan and its borders were roughly commensurate with that of modern Hidalgo state. The French succeeded in placing Maximilian I on the throne of Mexico, who visited Pachuca in 1865. Soon thereafter, insurgent activity against the French government intensified and after Maximilian was overthrown, the new republican government decided to make this military district the state of Hidalgo in 1869. The state was named after Miguel Hidalgo y Costilla, the first leader of the Mexican Independence movement.