Lisbon - Portuguese Prime Minister Antonio Costa's Socialist party has won the general election but without an outright majority in parliament.
The Socialists, who governed during the past four years with the support of two hard-left parties, captured 106 seats in the 230-seat assembly, compared to 77 seats for the main opposition centre-right Social Democrats (PSD).
This means the party will once again need support from at least one other party to pass bills.
The following are Costa's possible allies in the new parliament:21
Charts showing election vote share and the new parliament
Left Bloc (BE)
Born in 1999 out of the fusion of several tiny far-left parties, this party which is close to Spain's Podemos and Greece's Syriza is one of the two formations which propped up Costa's minority Socialist government during his firm term in office.
It captured 19 seats, the same as in the last election in 2015.
The party is close to the Communists -- the other formation which backed the Socialists -- in economic policy but is less staunchly opposed to Portugal's membership in the European Union and defends liberal policies on social issues such as legalising euthanasia and cannabis.
The leader of the party, 46-year-old former actress Catarina Martins, said the formation "is ready to negotiate an agreement that guarantees stability for the country."
Communist-Greens alliance (CDU)
Unlike the majority of its European peers, Portugal's Communist party has never rejected Marxist orthodoxy and it rejects the European Union, World Bank and International Monetary Fund as being capitalist.
The main opposition force against the decades-long right-wing dictatorship that ruled Portugal until it was toppled in a coup in 1974, the party has run together with the Greens in an alliance since this environmental party was formed in 1982.
This CDU alliance captured 12 seats in parliament on Sunday, down from 17 during the last election.
Its base is growing older and is concentrated in the southern Alentejo region as well as in the industrial belt of Lisbon where it holds power in several municipalities.
The party has been led since 2004 by Jeronimo de Sousa, a 72-year-old former metallurgical worker and has been less flexible than the Left Bloc.
Founded in 2009 by a writer and the leader of Portugal's Buddhist union, the party entered parliament for the first time during the last general election when it won a single seat. It captured four seats this time around.
Very active on social networks the party calls for a ban on bullfighting, lower taxes on pet food and the creation of a network of "pet-friendly" beaches, as well as measures to reduce carbon emissions.
The party voted in favour of Costa's budgets and has said it is open to backing a Socialist government in parliament in exchange for concessions on its issues.
"Our objective is to influence whoever is governing," said PAN leader Andre Silva, a vegetarian who attends group movement sessions known as "biodanza" which are intended to boost well being.
Unlike the Left Bloc and the CDU, it is not opposed to Portugal's NATO membership or European budget rules.
Costa also said he would reach out to upstart eco-socialist party LIVRE, or "FREE", which entered parliament for the first time with a single seat.