The vote ensured Europe's most outspoken leftist leader would remain Greece's dominant political figure, despite having been abandoned by party radicals last month after he caved in to demands for austerity to win a bailout from the euro zone.

In a victory speech to cheering crowds in a central Athens square, he promised a new phase of stability in a country that has held five general elections in six years, saying his mandate would now see him through a full term.

"Today in Europe, Greece and the Greek people are synonymous with resistance and dignity. This struggle will be continued together for a full four years," he said.

He made no specific reference to the 86 billion euro ($97 billion) bailout, but Syriza campaigned on a pledge to implement it, while promising also to introduce measures to protect vulnerable groups from some aspects of the deal.

"We have difficulties ahead of us but we also have a solid ground, we know where we can step, we have a prospect. Recovery from the crisis can't come magically, but it can come through tough work," he said.

Tsipras's first task after forming a government will be to persuade European Union lenders that enough agreed steps have been made to ensure the next payment. The bailout program is due for a review next month.

Jeroen Dijsselbloem, the Dutch head of the Eurogroup of finance ministers that use the single currency, said he looked forward to the swift formation of a new Greek government with a mandate to implement the bailout.

"Ready to work closely with the Greek authorities and to continue accompanying Greece in its ambitious reform efforts," Dijsselbloem tweeted.

Tsipras will also need to grapple with Greece's central role in Europe's refugee crisis, as the main entry point for tens of thousands of migrants who arrive by sea and trek up the Balkan peninsula to richer EU countries further north. He meets EU colleagues at an emergency summit over the crisis on Wednesday.

In a near repeat of January's general election, his Syriza party fell just shy of an outright majority but will form a coalition with his former partners, the small rightwing Independent Greeks party.

With 99.5 percent of votes counted, Syriza had claimed 35.5 percent of the vote, easily seeing off the main conservative challengers New Democracy on 28.1 percent.

The interior ministry said that gave Syriza 145 seats in the 300-seat parliament, just four fewer than when Tsipras first stormed to power early this year. The result was more decisive than had been indicated in opinion polls, which had predicted a close race.

New Democracy swiftly conceded defeat. Leader Vangelis Meimarakis said: "The electoral result appears to be concluding with Syriza and Mr Tsipras in the lead. I congratulate him and urge him to create the government which is needed."

Third place in the election again went to Golden Dawn, a far right party with a swastika-like symbol, with 7 percent of the vote.

WEARINESS

Tsipras resigned and called the election last month when his party split over his reversal on the bailout, which he had accepted despite having won an overwhelming referendum mandate in July to reject similar terms.

Many Greeks expressed weariness with politics during the campaign, tired of voting and frightened by the prospect of still more uncertainty that would worsen one of the worst depressions to hit an industrialized country in modern times.

Sunday's ballot was the third national vote this year, including the referendum. Turnout was 56.5 percent compared with 63 percent in January's election.

Some voters said they backed Syriza because Tsipras needed time to finish the job he began.

"They were ... the ones who signed the bailout so they have to implement it," said Fani Arvanitidi, 70.

The firebrand leftist fought hard for Greece to be let off harsh austerity rules imposed by international creditors, only to back down after Greece's banks were shut and the country was pushed to the wall.

More than two dozen of his lawmakers abandoned him last month, many saying he had betrayed his principles. He argued that his tough negotiating stance had softened the blow of austerity and had helped persuade creditors to agree a restructuring of Greek debt.

His centre-right opponents argued that his erratic leadership had worsened the economic crisis, throttling a recovery that had just begun before he took power.

But with Tsipras and his main opponents now all committed to the bailout, the deep divisions that had polarized Greece and given rise to volatile politics appear less extreme for now.

Apart from Golden Dawn and the communist KKE party, the major parties in the new parliament have now all accepted the cash-for-reforms deal to keep Greece in the euro zone.

"After years of almost unprecedented crisis, the vast majority of Greeks are endorsing parties that are promising to keep the country in the euro even if that implies thorough and painful reforms," Holger Schmieding, chief economist at Germany's Berenberg bank said.

For former allies still opposed to EU-imposed austerity, however, Tsipras is a turncoat.

Yanis Varoufakis, the outspoken former finance minister who infuriated EU officials with his refusal to accept their proposals, called the election "the 'legalization' of the capitulation that followed the signing of the dead end, humiliating and irrational" bailout.

The new government will also need to respond to Greece's central role in Europe's migration crisis, which could intensify as countries further along the land route north across the Balkans shut down their frontiers.

In a painful reminder of that crisis, 13 migrants died in Turkish waters on Sunday when a boat carrying 46 people en route to Greece collided with a dry cargo vessel and capsized, a Turkish coast guard source said.