 The war ended with a Liberal victory, and liberal President Benito Juárez moved his administration to Mexico City.In 1862, the country was invaded by France which sought to collect debts that the Juárez government had defaulted on, but the larger purpose was to install a ruler under French control.They chose a member of the Habsburg dynasty, which had ruled Spain and its overseas possessions until 1700.