Nicaragua's former Marxist guerrilla leader, Daniel Ortega, has won his country's presidency, promising to work to eliminate poverty and encourage private investment.
Electoral officials say that with 91 percent of the vote counted from Sunday's election, Mr. Ortega had 38 percent of the vote, compared to 29 percent for his nearest rival, Eduardo Montealegre, who conceded defeat.
Nicaragua's constitution requires a candidate to have at least 35 percent of the vote and a five-point lead over the closest rival to win outright.
Venezuelan President Hugo Chavez congratulated Mr. Ortega on his victory. Ailing Cuban President Fidel Castro, who is recovering from intestinal surgery, also sent congratulations in a message read on Cuban state television.
But the White House said in a statement that U.S. support for the new Ortega government would hinge on Nicaragua's commitment to democracy.
Earlier, State Department spokesman Sean McCormack said the United States wants to have continued good relations with Nicaragua. But McCormack said the state of relations will depend on the platform of the incoming government in Managua.
The United States had an antagonistic relationship with Mr. Ortega's Marxist government in the 1980s and backed Contra rebels in a war against his Soviet-backed administration.
Some U.S. lawmakers have warned that a victory by Mr. Ortega would damage relations with Washington. In his campaign, however, Mr. Ortega suggested he had turned away from his Marxist policies and promised to promote reconciliation and peace.
The State Department said Secretary of State Condoleezza Rice spoke by telephone with former U.S. President Jimmy Carter, who is in Nicaragua to monitor the election, and has said relatively minor problems noted were not severe enough to affect the outcome.
Mr. Carter has met with Mr. Ortega and urged reconciliation with Washington.
Some information for this report was provided by AFP, AP and Reuters.