Greece’s Alexis Tsipras has said his left-wing Syriza party has a “clear mandate” after winning a second general election in less than nine months.
But he said Greeks faced a difficult road and recovery from financial crisis would only come through hard work.
Syriza won just over 35%, slightly down on its previous result and still short of an overall majority.
But it will renew its coalition with the nationalist Independent Greeks. Opposition New Democracy gained 28%.
Far-right Golden Dawn came in third with 7%, slightly up on January’s poll.
Syriza was first elected in January on an anti-austerity mandate, but was forced to accept tough conditions for Greece’s third international bailout.
Sunday’s snap election was called after Mr Tsipras lost his majority in August.
Some of his MPs who had opposed the new bailout conditions split to form a new party, but it has failed to get into parliament. Turnout was low.
They expected victory, but not by this kind of margin. Only days ago, pollsters and pundits were predicting a tight-run contest, Syriza neck-and-neck with its conservative rivals, New Democracy. Instead, Syriza can comfortably form a coalition government with its previous partner, the nationalist Independent Greeks.
Critics wondered whether it was worth holding a contest which left Greece with the same government as before. But Syriza’s leader, Alexis Tsipras, is now in a stronger position, his decision to accept austerity measures in return for bailout cash apparently vindicated by the result.
Yet celebrations have been muted – hundreds not thousands gathering to sing, dance and wave flags. This country has more tough times ahead – tax rises, perhaps further cuts to wages and benefits. The re-elected prime minister has an in-box that no-one could envy.
Mr Tsipras was joined at the celebrations by Independent Greeks leader Panos Kammenos.
“Together we will continue the struggle we began seven months ago,” Mr Tsipras said.
Among the challenges facing Mr Tsipras will be satisfying international creditors that Greece is meeting the terms of the latest bailout package worth up to €86bn ($97bn, £61bn). It involved more austerity for ordinary Greeks.
Creditors carry out a review in October and there is still some opposition from within Syriza.
Jeroen Dijsselbloem, who heads the Eurogroup meetings of eurozone finance ministers, said he was “ready to work closely” with the new Greek government.
The Greek electoral system means the party with the largest number of votes wins a bonus of 50 seats – and Syriza will have 145 seats in the 300-seat parliament, only four fewer than in Mr Tsipras’s January victory.
The Independent Greeks party, which is anti-austerity but agrees with Syriza on little else, won 10 seats. New Democracy won 75, Golden Dawn 18.
Mr Tsipras won despite voters’ rejection of austerity in a July referendum.