Latin American leaders have welcomed the election of Tabare Vazquez to the Uruguayan presidency.
Mr Vazquez's supporters celebrated on the streets of Montevideo
The victory for his leftist coalition brought two-party rule in Uruguay to an end for the first time in 170 years.
Venezuela's left-wing President Hugo Chavez said Mr Vazquez's election heralded a step towards the shaping of a new South America.
Cuba said diplomatic ties might be restored after two years of strained relations.
Links between Uruguay and the Cuban government were broken off two years ago after Mr Vazquez's predecessor sponsored a United Nations motion condemning Cuba's human rights record.
A triumphant Mr Vazquez appeared in front of thousands of celebrating supporters in Uruguay's capital, Montevideo, after official results gave him 50.69% of the votes cast.
Some 30,000 ballots remain to be counted before the Court of Elections could confirm his victory, but his two main rivals have conceded.
It was also the first win for Mr Vazquez's Frente Amplio (Broad Front) coalition party.
Venezuela's president welcomed victory for the left-winger as "a milestone" in Latin American history.
"What has happened in Uruguay is one more step on the road to building a new South America, a new Latin America, a new world that is being born," Mr Chavez said.
In a statement released through its embassy in Montevideo, the US congratulated Mr Vazquez.
"We hope that during his term, relations between the people of Uruguay and the United States will become even firmer," it said.
Vazquez won just over 50% of the vote, so avoiding a run-off
Jorge Larranaga of the National Party was Mr Vazquez's closest rival with 34%, while Guillermo Stirling from the ruling Colorado Party was beaten into third place with only 10% of the vote.
"Celebrate, Uruguayans!" Mr Vazquez told thousands of people gathered in front of his party's headquarters.
"This victory is yours," he said, before thanking them for their support as fireworks lit up the night sky.
The 64-year-old cancer specialist told a news conference it had been a "magical night", and that he would not let Uruguay down.
All three candidates had tried to convince voters that they were best placed to manage the country's economy following its worst-ever crisis in 2001 and 2002.
Voting is compulsory in Uruguay, and 2.5 million people out of a population of 3.4 million were eligible to vote. They also chose 31 senators and 99 deputies.
Mr Vazquez joins Nestor Kirchner of Argentina, Luiz Inacio Lula da Silva of Brazil, Ricardo Lagos of Chile and Mr Chavez on the list of left-wing and centre-left South American leaders.
Mexico City Mayor Andrea Manuel Lopez Obrador said the surge in support was rooted in the desire for Latin Americans to find political alternatives against a background of economic gloom.
Although the Uruguayan economy is now recovering strongly, one in three Uruguayans lives below the poverty line and unemployment is almost 15%.
Mr Vazquez won backing from voters for his critical stance towards the conservative economic policies of the International Monetary Fund and the US, BBC Americas analyst Simon Watts says.