Portugal's Prime Minister Antonio Costa prepared Monday to govern solo after his Socialist party scored a surprise landslide win, with economic recovery from the pandemic among his top priorities.

Costa's party secured a parliamentary majority in Sunday's snap election, which also saw the far-right Chega party make significant gains.

The Socialists received 41.7 percent of the vote, bagging 117 seats in the 230-seat parliament -- up from 108 in the outgoing assembly.

Four seats still need to be attributed in the coming days from the results of votes cast abroad, but in 2019 the Socialists obtained two.

The Socialist party of Portuguese Prime Minister Antonio Costa won a parliamentary majority in Sunday's vote
The Socialist party of Portuguese Prime Minister Antonio Costa won a parliamentary majority in Sunday's vote AFP / PATRICIA DE MELO MOREIRA

The results defied final polls which had suggested that the Socialists were in a tie with the main opposition centre-right PSD, which finished second with 76 seats.

President Marcelo Rebelo de Sousa is now expected to formally invite Costa, who has headed two minority governments since 2015, to form a new government.

"The conditions have been created to carry out investments and reforms for Portugal to be more prosperous, fairer, more innovative," Costa said in his victory speech.

The prospect of a stable government is crucial for Portugal to make the most of a 16.6 billion euro ($18.7 billion) package of EU recovery funds it is due to receive by 2026.

Portugal's economy is starting to recover after shrinking 8.4 percent in 2020 as the Covid-19 pandemic hurt its key tourism sector and other businesses.

The incoming Portuguese parliament
The incoming Portuguese parliament AFP / Gal ROMA

It rose by 4.9 percent in 2021, its fastest pace since 1990, boosted by growing exports and investment.

The unemployment rate fell to 5.9 percent in December -- its lowest level in nearly two decades.

But the economy is still 1.4 percent below its pre-pandemic level, one of the weakest performances in the eurozone, Capital Economics said in a research note.

Socialist supporters celebrated after the party received 41.7 percent of the vote
Socialist supporters celebrated after the party received 41.7 percent of the vote AFP / PATRICIA DE MELO MOREIRA

The "big challenge" is to achieve "sustained GDP growth driven by rising productivity" after the pandemic, it added.

Costa has said he would like to use the bulk of the EU funds to modernise Portugal's infrastructure.

This is only the second time that Portugal has a Socialist government with an outright majority in parliament since the country returned to democracy in 1974 following the end of a decades-long dictatorship.

Until now the former Lisbon mayor had to rely on support from two far-left parties -- the anti-capitalist Left Bloc and the Communist Party -- to govern.

Sunday's polls were called after the two formations sided with right-wing parties to reject Costa's 2022 draft budget in October.

The radical left had pushed for more social spending and wanted a faster rise in the minimum wage than what was promised by Costa, but both lost seats.

Voters punished the far-left for sparking the political crisis by backing the Socialists, said Antonio Costa Pinto, a professor at Lisbon University's Institute of Social Sciences.

The Socialists will now "stop making significant concessions as it did in the past to those on its left," he told AFP.

The joy in the Socialist camp was tempered by the rise of far-right Chega party, which won 12 seats up from just one, making it the third largest party in parliament.

Chega's leader Andre Ventura, a tough-talking former TV sports commentator, has vowed to fiercely oppose Costa in the new parliament.

"Antonio Costa, I am coming for you," he said. "From now on there won't be a soft opposition. We will assume the role of being the real opposition to the Socialists... and restore dignity to this country."

Under Costa's watch, Portugal has rolled back austerity measures, maintained fiscal discipline, increased the minimum wage significantly and slashed unemployment to pre-pandemic levels.