Leftist Rafael Correa has won Ecuador's presidential run-off election, a top electoral official has said.
Mr Correa has already made policy announcements
With nearly all votes counted, Mr Correa had just over 57% of the vote while his conservative rival Alvaro Noboa polled 42.8%.
Washington has congratulated Mr Correa, who opposes a free trade deal with the US, on his apparent victory.
Mr Noboa, a billionaire banana tycoon, has not yet accepted defeat and said he may ask for a recount if necessary.
"Rafael Correa is the new president of Ecuador. The trend is not going to change," said Narciza Subia, one of seven Supreme Electoral Tribunal judges.
On Monday, the Organisation of American States recognised Mr Correa's "presumed triumph" and US Ambassador Linda Jewell made a congratulatory telephone call.
However, Mr Correa will not be officially named president-elect until all votes are counted. An official announcement is expected on Thursday.
The 43-year-old economist has moved quickly to make policy announcements and appoint ministers.
Mr Correa, who is close to Venezuela's anti-American President Hugo Chavez, said he will try to rejoin the Organisation of Petroleum Exporting Countries (Opec) which Ecuador left in 1992.
He also named leftist economists Ricardo Patino and Alberto Acosta as his economy and energy ministers.
While campaigning, Mr Correa said he wanted to renegotiate contracts with foreign oil companies, but it is thought unlikely that he will nationalise Ecuador's energy industry.
Both candidates had promised to create jobs and fight poverty and corruption. Both had also promised to double the monthly government payout poor Ecuadoreans receive.
Ecuador has seen much political turmoil in recent years with seven presidents in the last decade.
The last three elected presidents were overthrown and only three since 1979 have succeeded in serving full terms.