Portugal's socialist prime minister António Costa declared victory in national elections early Monday, saying he would continue to govern in a coalition nicknamed the 'Geringonça' or 'contraption'.
His Socialist Party (PS) gained support but failed to secure enough seats for an outright majority.
It means he must negotiate a new deal with one or both of his far-left allies in the previous legislature, although he said he would also talk to the new People-Animals-Nature party (PAN) party.
"The Portuguese liked our arrangement," Costa told cheering crowds of supporters. "We will see if it's possible."
His main challenger, Social Democrats (PSD) led by Rui Rio, came second with 28%, giving them at least 77 seats.
There is also an expansion of the number of parties in Portugal's parliament, with national-conservative Chega (ECR) and LIVRE (Greens/EFA) winning seats for the first time in history.
Costa has benefited from an economy that is growing more than the EU average, helped by increased exports and a booming tourism industry that last year saw visitors outnumber Portugal's inhabitants.
Unusually for present-day Europe, there was little mention in this election of populism or the far-right.
Official estimates suggest the turnout was slightly lower than in previous elections. According to a poll by Católica for RTP, abstention looks to be between 44% and 49%.
Across the European Union, radical new parties are reshaping the political landscape while traditional Socialist parties have lost ground, but that’s not the case in Portugal.
Costa, 58, hoped to secure an absolute majority. The wily operator previously held cabinet posts in three governments and served two consecutive terms as mayor of the capital, Lisbon.
He has overseen a strong economic recovery, with growth climbing from 0.2 per cent in 2014 to 2.1 per cent in 2018 and unemployment dropping by around half, to 6 per cent, over its term.
Unlike many other recent European elections, immigration has not been an election issue. That may be because the European Union’s migrant surge has largely bypassed Portugal.
Hundreds of thousands of undocumented migrants have crossed the Mediterranean from North Africa to southern Europe, triggering a backlash in Italy and Spain. Portugal doesn’t lie on those geographic routes, and as one of western Europe’s financially poorest countries its appeal to migrants is muted.
The number of asylum-seekers in Germany and France, together numbering more than 300,000 last year, dwarf Portugal’s total, which barely reached four figures.
If migration reached a similar scale in Portugal, the Portuguese could swiftly change their attitude, says Antonio Costa Pinto, a professor at Lisbon University's Social Sciences Institute.
“There’s nothing making Portugal immune” to migrant controversies, he said.