Austerity protest swings Portugal vote
In Portugal, three years of painful austerity under a eurozone bailout contributed to a defeat for the governing right-of-centre coalition, but failed to hand the opposition Socialist Party a resounding victory of the kind it wanted.
There is 18 months to go before the next general election.
With 99.5% of votes counted - including those from all domestic polling stations - the Socialists had a 31.5% share, against 27.7% for the joint list of candidates put up by the centre-right Social Democrats and the People's Party - an almost exact reversal of the result in 2009.
But with results from 15 of 71 consulates still to come in - and the ranks of voters abroad swelled by mass emigration - the final allocation of Portugal's 21 European Parliament seats remains to be determined.
One major upset is confirmed - at least one seat will go to the MPT - Partido da Terra (Earth Party), founded in 1993 as a conservative ecological movement. Now it is known to voters above all thanks to its high-profile lead candidate, Antonio Marinho e Pinto. The party polled 7.2%.
A former head of Portugal's lawyers' association, with no previous links to the party, Mr Marinho e Pinto built a reputation as a critic of the country's establishment, lambasting judges, the police and politicians in interviews.
In the campaign, he called for a return to the "purity" of European ideals such as justice and solidarity, but dismissed the idea of Portugal giving up the euro. In parliament, he said, the MPT would "strengthen the environmentalist camp", but in any second round of voting for the president of the European Commission it would back the Socialist candidate.
The night's other big winner was the Communist Party, which added two points to 12.7%, after campaigning for a referendum on leaving the euro.
Turnout hit a record low of 33.9%, down from 36.9% in 2009 - undoubtedly hurt by the fact that many voters who have gone abroad to seek work are still registered in Portugal.