Nicaragua 's beleaguered president , Enrique Bolanos , announced that he had reached an agreement with Daniel Ortega , the Sandinista leader and former president , to defuse a political crisis that had threatened to throw the country into turmoil .