World leaders have welcomed the narrow election victory of Greece's broadly pro-bailout New Democracy party and urged Athens to form a cabinet quickly.The eurozone group said reforms were Greece's "best guarantee" to overcome tough economic and social challenges.
The US stressed that it was in everyone's interests "for Greece to remain in the euro area".
The Syriza party, which rejected the bailout terms and came a close second, said it would lead the opposition.
With 99.9% of ballots counted, interior ministry results put New Democracy on 29.7% of the vote (129 seats), Syriza on 26.9% (71) and the socialist Pasok on 12.3% (33). There are 300 seats in parliament.
Greek voters had gone to the polls on Sunday following inconclusive elections in May.
New Democracy leader Antonis Samaras said Greeks had chosen to stay in the euro and called for a "national salvation government".
AnalysisNew Democracy leader Antonis Samaras had portrayed this election as a choice between staying in the euro or going back to the drachma.
But that's not how Syriza and its supporters saw it - they believed it was about promoting a different kind of economic policy to help Greece out of a spiral of recession and unemployment.
The winner gets an extra 50 seats in parliament and that could be the decisive difference.
But it will still need to put together a coalition government which is strong enough to last - and that may not be so easy.
Syriza's leader Alexis Tsipras said his party would not take part in the government, and would instead become a powerful anti-austerity voice in the opposition.The BBC's Mark Lowen, in Athens, says Mr Samaras is expected to try for a broad coalition, hoping to create a stable government with a stronger popular mandate.
He says Mr Samaras will push for a lightening of the bailout terms from Brussels, arguing that Greeks have accepted more pain by electing a pro-bailout party and that Europe should now cut Greece some slack.
Tough austerity measures were attached to the two international bailouts awarded to Greece, an initial package worth 110bn euros (£89bn; $138bn) in 2010, then a follow-up last year worth 130bn euros.
Sunday's vote was watched around the world, amid fears that a Greek exit from the euro could spread contagion to other eurozone members and deepen the turmoil in the global economy.
Stock markets responded positively to Sunday's results, with share prices up in Asian trading.
BBC business editor Robert Peston says the results have been seen by investors as avoiding the worst short-term outcome, which would have been political paralysis followed by a messy exit from the euro.
'No time to waste' In a statement on behalf of the 17 eurozone finance ministers, Luxembourg Prime Minister Jean-Paul Juncker said that "continued fiscal and structural reforms are Greece's best guarantee to overcome the current economic and social challenges and for a more prosperous future of Greece in the euro area".
Antonis Samaras New Democracy leaderThere will be no more adventures. Greece's place in Europe will not be put in doubt”
In a joint statement European Commission President Jose Manuel Barroso and European Council President Herman Van Rompuy also hailed the result, and expressed hope that a government would be formed quickly.German Chancellor Angela Merkel telephoned Mr Samaras to congratulate him on his victory.
A German government statement said she had "stated that she would work on the basis that Greece will meet its European commitments".
Mr Samaras said that the Greek people had voted to stay in the eurozone.
"There is no time to waste," he said. "A national salvation government must bring economic growth and reassure Greeks the worst is over."
He added: "There will be no more adventures. Greece's place in Europe will not be put in doubt," promising that Athens would "honour its obligations".
Our correspondent, Mark Lowen, says this suggests that Mr Samaras wants to press ahead with spending cuts demanded by the country's international creditors.
European leaders have warned that if the new Greek government rejects the bailout, the country could be forced to abandon the single currency.
However, coalition talks may not be easy.
In addition to Syriza's showing, four other parties which oppose or want a radical overhaul of the bailout look set to take between 60 and 70 seats. They include the far-right Golden Dawn, which has about 7% of the vote.
New Democracy and Pasok have said they will keep the bailout in a renegotiated form.
The leader of Pasok, Evangelos Venizelos, proposed a broad four-party coalition including New Democracy, Pasok, the Democratic Left and Syriza.
"No decision can be taken without this national unity," he said.