While in exile in France he inspected military and medical facilities. He returned to Mexico in December 1836, as he had been called back by President José Justo Corro to fight in the War of Texas Independence. However, once he was back in the country, Congress declared him president (17 April 1837).