Nicaragua's President, Enrique Bolanos, has announced an agreement with the opposition-controlled Congress to end a deepening political crisis.
President Bolanos had warned of a slow-motion coup
A power struggle had threatened the government and US aid to the country.
The pact was reached between Mr Bolanos and the left-wing Sandinista leader, Daniel Ortega.
They agreed to delay constitutional reforms which weaken the president's powers until next year, when Mr Bolanos leaves office.
The move comes after the Organisation of American States warned that Nicaragua's democracy was under threat.
Last week, the US deputy secretary of state, Robert Zoellick, threatened to cut off aid if the opposition continued to work against Mr Bolanos.
The Nicaraguan president, who took office in 2002 after a landslide victory over Mr Ortega, had claimed he was the innocent victim of a pact between the Sandinistas and his own Liberal Party.
The Liberals turned against him - and joined forces with former rivals the Sandinistas - angered by the government's decision to prosecute party leader Arnoldo Aleman for corruption.
Former president Aleman is serving a 20-year sentence for fraud and money-laundering, but he still commands the loyalty of many of his party's legislators.
The Nicaraguan Congress - controlled by both Liberals and Sandinistas - has been debating a proposal to impeach Mr Bolanos for alleged campaign finance violations.
The legislators have already stripped six of Bolanos' ministers and three senior officials of their immunity from prosecution.
The president had denounced what he say is a "slow-motion coup" in Nicaragua.