Portugal's ruling Socialist Party has won an unexpected outright majority in Sunday's snap general election for only the second time in its history.
The election was called when Prime Minister António Costa failed to pass a budget after losing the support of two smaller parties.
Mr Costa said Portugal needed stability to ensure economic recovery.
Far-right party Chega also increased its support and will be the third largest party in parliament.
The result comes as a surprise after polls suggested the Socialist Party had lost most of its advantage in the run up to the vote.
In his victory speech, the prime minister promised he would govern for everyone.
"An absolute majority doesn't mean absolute power. It doesn't mean governing alone. It's an increased responsibility."
The Socialist Party won 117 seats in the 230 seat parliament, up from 108 in the outgoing assembly. The main opposition centre-right Social Democrats won 71 seats.
The Socialists' victory means that Portugal is likely to have a stable government to lead the country out of the pandemic, and to administer a €16.6bn ($18.7bn) package of EU recovery funds.
Far-right Chega will be the third largest party in parliament for the first time, winning 12 seats.
Its leader, former TV sports commentator André Ventura, grabbed headlines by railing against corruption and the Roma community, and calling for chemical castration for sex offenders.
Mr Ventura hailed Sunday's result as marking the end of "soft" opposition to the Socialists.
Mr Costa said that if, as expected, Portugal's president now asks him to form a government, he will in future be open to dialogue with all political forces except Chega.
More than a tenth of Portugal's 10 million people were estimated to be isolating due to Covid-19 during the election, but the government allowed them to vote in person. Electoral officials wore protection suits to receive them.
Source: BBC