 Morazán was then in his second term as president of the federation.On 1 February 1839, Morazán turned the presidency over to Vigil.Nicaragua, Honduras and Costa Rica had withdrawn from the federation in 1838, and soon Guatemala followed suit (17 April 1839).