By Andrei Khalip
LISBON (Reuters) - Portugal's ruling Social Democrats took a heavy beating in local elections on Sunday as voters passed their verdict on the austerity measures that accompanied the 2011 international bailout.
While it does not directly impact the government, the poor election result could weaken its resolve for further budget cuts demanded by foreign lenders and should embolden the opposition's anti-austerity stance during a review visit by European Union and IMF officials.
With 99 percent of the ballot counted on Monday, preliminary results of the election, for 308 municipal mayors and thousands of smaller councils, showed the votes boosting the main opposition Socialists. They grabbed 36.4 percent of the vote while the Social Democrats (PSD) won 26.5 percent.
Independent candidates also advanced, winning the second-largest city of Porto and its industrial satellite city of Matosinhos, a traditional Socialist bastion.
Prime Minister Pedro Passos Coelho acknowledged that the center-right government was taking a hit for its austerity measures, which have contributed to Portugal's worst economic crisis since the 1970s, with two-and-a-half years of recession and record unemployment.
"We know there's always a price to pay in politics," said Passos Coelho.
His priority is to press ahead to exit the bailout as planned in mid-2014, he said.
"But we also know that this path will give us the chance to end our bailout program and recover our opportunity to grow and give more social justice and prosperity for all," he said.
Antonio Costa Pinto, a political scientist in Lisbon, did not expect any immediate consequences for government plans and its relationship with the lenders, but said the ruling party may lose some of its appetite for more austerity down the road.
"There's likely to be some bad blood within the PSD and that may complicate things for the premier," he said. "But in the next week or so, it's just the troika calling the shots with their review and the government will just have to abide."
Portugal's benchmark 10-year bond yields were little changed at 6.91 percent after Friday's 6.89 percent. Last week they slipped below the 7 percent level, seen as prohibitively high.
Lisbon told Brussels on Monday it was on course to meeting this year's budget gap goal of 5.5 percent, but analysts warn 2014's 4 percent target is far more challenging.
With 10 of the 308 results still to be declared, the Socialists were up 11 at 143 mayors elected, and the party claimed it won a total of 150.
The PSD won 105, down from 137. The PSD's worst previous record was a haul of 114 mayors in 1989, although recent merging of some local council makes a direct comparison difficult.
Still, the PSD's coalition partner, the rightist CDS, had five mayors elected in a major improvement from one in 2009. The Communist-Greens alliance had 33, up five. Twelve independents were elected, up from seven, after a record 80 candidates stood.
Socialist leader Antonio Jose Seguro said the results showed "an enormous will for change" among the Portuguese, while analysts put it down to voter fatigue with the waves of spending cuts and the biggest tax hikes in living memory.
Passos Coelho, whose government nearly collapsed in July over a dispute about austerity, said he would continue policies to complete the bailout plan as scheduled in mid-2014. The government insists it will not need a second rescue package although many economists say it well might.
The government has promised spending cuts of more than 4 billion euros by the end of 2014 in order to meet its budget deficit goals, but has been facing growing resistance at home from business groups, unions and the opposition, which want it to negotiate a new easing of the targets.
A general election is not due until 2015 and the government has a solid majority in parliament to pass bills, although its austerity plans have been increasingly running into problems at the Constitutional Court that has shot down some of its reforms.
(Reporting By Andrei Khalip; Editing by Angus MacSwan)