In the ballot, the Socialists claimed a record of at least 157 town halls, with most of their gains made in previously Communist-held councils.
The mayors of Lisbon and Porto were re-elected.
Fernando Medina kept the PS in power in Lisbon, but lost the majority that his predecessor, António Costa, now the Prime Minister, gained back in 2013. The Popular Party were elected as the official opposition.
In Porto, independent candidate Rui Moreira was re-elected as mayor with an absolute majority.
Controversial independent candidate, Isaltino Morais, who in 2013 was convicted of tax fraud and money laundering, won the election in Oeiras with an overall majority of 41.65 percent of the vote.
Morais was mayor of Oeiras for more than 20 years until he was sent to jail in 2013.
The result is the PS party’s best ever in the local elections, but may have repercussions on its informal coalition agreement with leftist parties PCP (Communist Party) and Left Bloc, which fared poorly, losing a number of seats to PS.
In the Algarve, 10 of the 16 councils were won by the Socialists, while the Communists took charge in Silves.
The remaining five councils were won by the PSD Social Democrats, most with the assistance of coalitions.
Social Democrat leader Pedro Passos Coelho meanwhile recognised his party’s poor showing.
The former Portuguese prime minister and chairman of the centre-right PSD has said he will be stepping down as the party’s leader.
Pedro Passos Coelho told his party’s political commission that he would not be standing again at the next party elections. The leader however stressed he was not resigning, and would continue to lead the opposition until the next party conference.
The PSD had its worst election results ever at Sunday’s local elections, and now holds only 98 of the 308 councils nationwide.
Meanwhile, more than half of all registered voters in the Algarve failed to vote in the local elections last Sunday.
The region’s abstention rate came in at 52.56 percent, meaning more than half of all registered voters decided to stay at home.
The Algarve had the second highest abstention rate, only after Setúbal.
Nationally, 45.05 percent of registered voters failed to cast a vote.