By Renee Maltezou and Harry Papachristou
ATHENS, June 29 (Reuters) - Greek police fired teargas and battled masked demonstrators who attacked the finance ministry on Wednesday after lawmakers passed the first of two austerity bills demanded by international lenders to stave off default.
As thousands of protesters rallied outside parliament, deputies voted by 155 to 138 to pass a framework bill on a bitterly contested package of tax hikes, spending targets and privatizations agreed as part of an EU/IMF bailout.
The result cleared the way for a second vote on Thursday to pass a separate bill enabling individual budget measures and the creation of a privatization agency. Five MPs abstained and two were absent.
Both bills laying out a 28 billion euro ($39.7 billion) austerity plan must be passed for the European Union and International Monetary Fund to release a vital 12-billion-euro loan tranche which the government needs to be remain in funds.
"Today a significant step was taken, tomorrow the second one will take place and Sunday I will be able to go to the Eurogroup meeting with credible credentials for the country," Finance Minister Evangelos Venizelos told Reuters after the vote.
However, the bitter opposition to the plan among broad sections of the Greek population was underlined by the violence which erupted on Syntagma Square just outside parliament as the votes were being counted.
Lawmakers from across the political spectrum denounced the riots and appealed for calm in the square, where hooded youths and police fought battles into the night.
"The metro station has become a gas chamber, innocent protesters were trapped, fires are breaking out in buildings, the ambulances can't get to the injured," said conservative New Democracy party spokesman Yannis Mihelakis.
With Greece stuck in its worst recession since the 1970s and a youth unemployment rate of more than 40 percent, ordinary people face years of grim austerity and many feel deeply resentful of Greek politicians, the EU and the banks.
"Cops, pigs, murderers," chanted the crowd at a line of helmeted riot police as flash bombs and teargas projectiles thrown by police to drive back the crowd filled the square outside parliament with stinging white smoke.
One group of protesters attacked the nearby finance ministry on Syntagma Square, setting fire to a post office on the ground floor of the building.
Another group tried to set ablaze an office block housing a branch of one of Greece's biggest banks while across the square, the luxury King George Hotel was evacuated.
Doctors working with the demonstrators said they had treated at least 25 people for minor injuries and hundreds with respiratory problems at the adjacent Syntagma metro station. At least 40 police officers were hurt, the police union said.
Police said 11 people were arrested and 19 people rushed to hospital. Health officials said a total of 99 people were treated in Athens hospitals.
European Commission President Jose Manuel Barroso and European Council President Herman Van Rompuy said in a statement that if the second vote passes, release of the loan tranche could be approved by finance ministers on Sunday.
Even with the first bill's approval, there remains a risk that lawmakers may reject detailed austerity bills in votes on Thursday on the implementation of different elements of the plan, such as tax rises and the sale of state assets.
That could complicate not just a decision on the 12 billion euro tranche of last year's 110-billion-euro bailout but also discussions on a planned second bailout of about the same size that will include some 30 billion euros in private sector participation.
Mihalis Tzelepis, a deputy from the ruling PASOK party, said that although he backed the basic austerity package, he still had serious reservations and was not sure how he would vote on the second bill.
"Will there be a way to compensate households for the heating fuel increase? Will there be exemptions for agriculture to help it be competitive? I am waiting for answers to see what I will do in the implementation law," he told parliament.
Bowing to pressure from lawmakers, Venizelos softened some of the measures, such as increasing the tax-free threshold for families with children, to bolster support for the bill.
The government may get more support from the main conservative opposition on the second bill. New Democracy said that although it will reject the bill as a whole, it will vote for some of its articles.
"We will reject it in principle. However, we will support the privatizations mechanism as well as the articles on spending," said New Democracy deputy Yannis Vroutsis.
Financial markets reacted positively to Wednesday's vote but there was no confidence that it solved Greece's longer-term problems, with EU officials and lenders deep in negotiations over the second rescue package.
"It is obviously an encouraging development in the sense that it reduces the chance of an imminent disaster for Greece," Ben May, an economist with Capital Economics in London, said.
"The bigger issue is there is a lot of uncertainty about the second bailout package and, even when in place, if Greece will be able to implement the privatizations and all the austerity measures," he said.
Greece's industrialists said the bill gave Greece time to push much needed reforms and get back on a growth path.
"The passage of the mid-term plan is just giving us a breathing space to finally, drastically cut the bloated public sector, fight the scourge of tax evasion and create a climate conducive to business," Dimitris Daskalopoulos, head of Greece's biggest employers' group SEV (Hellenic Federation of Enterprises), told Reuters.
The vote, which was opposed by the center-right opposition, passed after conservative deputy Elsa Papadimitriou defied her New Democracy party and voted for the package.
That made up for up for Panagiotis Kouroublis, a rebel from the ruling PASOK party who voted against and was immediately expelled from the party.
($1 = 0.705 Euros)
(Additional reporting by George Georgiopoulos, Ingrid Melander, Daniel Flynn and Dina Kyriakidou; writing by James Mackenzie and Dina Kyriakidou; Editing by Ralph Boulton)