ATHENS, July 15 (Reuters) - Protesters threw petrol bombs at Greek police outside parliament in Athens on Wednesday as lawmakers prepared to vote on a painful austerity package that European creditors have demanded in return for a new bailout to keep the country in the euro.
The clashes, the most serious Greek street violence in three years, erupted as Prime Minister Alexis Tsipras was struggling to contain a backlash in his own leftwing party against the deal that he was forced to accept after grueling talks in Brussels earlier this week.
More than half of the ruling Syriza party's 201-member central committee signed a statement rejecting the "humiliating" terms of the bailout, saying it was not compatible with the principles of the political left. "This proposal cannot be accepted by the people of Syriza," they said.
With pro-European opposition parties set to back the bailout, the measures are expected to pass some time after midnight (2100 GMT). But around 30-40 Syriza lawmakers are likely either to abstain or vote against the government, raising a question mark over how long Tsipras can remain in office.
Speaking to Syriza lawmakers before the vote, Tsipras warned he would need the support of his party to stay, a government official said.
"I am prime minister because I have a parliamentary group that supports me. If I do not have its support, it will be difficult to be prime minister the day after," he told the lawmakers, according to the official.
While the debate in parliament went on, the air outside on Syntagma Square was thick with tear gas as police dispersed a rally of several thousand anti-austerity protesters.
The demonstration was largely peaceful until a small group threw the petrol bombs at police, who responded with the tear gas and flash bombs. Calm returned later but nearby streets were empty and garbage bins were still burning. About 30 people were detained, according to a police source
"A NEW VERSAILLES TREATY"
Former finance minister Yanis Varoufakis, who was sacked by Tsipras last week, earlier denounced the bailout as "a new Versailles Treaty" - the agreement that demanded unaffordable reparations from Germany after its defeat in World War One.
Deputy finance minister Nadia Valavani resigned and Energy Minister Panagiotis Lafazanis said he would not back the deal.
"The choice between a bailout or catastrophe is a choice made in the face of terror," Lafazanis, who heads the far-left flank of Syriza, told reporters.
Even ministers supporting the deal could muster little enthusiasm for an accord which will impose a mix of tax increases, public spending clamps and pension and labor reforms on the already severely weakened economy.
"It's a difficult deal, a deal for which only time will show if it is economically viable," Finance Minister Euclid Tsakalotos told lawmakers during a debate on reforms.
A snap election could follow if the prime minister's majority collapses.
Tsipras is expected to reshuffle his cabinet after the vote, replacing Lafazanis and Deputy Labor Minister Dimitris Stratoulis, another bailout opponent, and possibly making other changes.
A study by the International Monetary Fund issued on Tuesday called for much more debt relief than Greece's euro zone creditors, particularly Germany, have been prepared to accept so far.
Berlin, which along with the other creditors knew about the IMF study before agreeing to new bailout talks, may wince at providing huge debt relief to a country it scarcely trusts to honor its promises.
But Germany insists on having the IMF in the negotiations to help keep Greece in line. It may countenance extending repayment periods for Greek debt but says it will not accept a writedown, with the finance ministry insisting it could not accept "a debt haircut via the backdoor."
"EUROPE'S BANKRUPT CHILD"
Given the hurdles facing the agreement, doubts have already surfaced about how long it can hold together, with one senior European Union official saying it had a "20-, maybe 30-percent chance of success."
With Greece facing an urgent deadline on July 20, when a 3.5 billion euro payment to the European Central Bank is due, EU officials were racing to agree a bridge financing accord that would enable Athens to avoid defaulting on the loan.
There were strong objections from both Britain and the Czech Republic - EU countries that do not use the euro - to proposals to provide a 7 billion euro loan from the European Financial Stability Mechanism (EFSM), an EU-wide fund not intended for euro zone funding needs.
The European Commission published its own assessment of Greece's debt burden on Wednesday that also offered the prospect of debt relief. While also ruling out any write-offs, the Commission said debt reprofiling was possible, as long as Greece implemented the reforms it has committed to.
The French parliament voted to back the bailout accord while British Prime Minister David Cameron, fighting his own battle with Brussels to reform the EU, joined calls to give Greece debt relief but ruled out contributing to the bailout.
Washington has stepped up pressure for a deal between the euro zone and NATO member Greece. U.S. Treasury Secretary Jack Lew is making a short-notice trip to Frankfurt, Berlin and Paris this week to press for a quick agreement.
The U.S. stock market fell to the day's low as tensions heated up in Athens. It was unclear, however, whether the market was down because of worries about the outcome of the Greek vote or because the global price of oil was falling sharply.
Earlier, European stocks rose and bond yields fell, with investors betting parliament would back the bailout.
Although the bailout package is much tougher than the Greek people could have imagined when they resoundingly rejected a previous offer from the creditors in a referendum on July 5, most want to keep the euro.
With banks shut and the threat of a calamitous exit from the currency bloc hovering over the country if it cannot conclude a deal, many Greeks see the package as the lesser of two evils.
"We are Europe's bankrupt child and as a child, Europe has been supporting us for five years and told us what we needed to do to get out of this situation," Yannis Theodosis, a 35-year-old civil engineer. "We did nothing and now we are paying the consequences."
Civil servants held a strike on Wednesday, as did pharmacists, whose industry would be opened up under the reform package, in a series of demonstrations which passed peacefully until the clashes in the evening.
The latest deal was a capitulation from Syriza, which stormed to power promising an end to austerity. The fiery parliamentary speaker and the party's parliamentary spokesman both announced they would vote against reforms. Such outbursts had one right-wing newspaper crowing over the "civil war" engulfing the party.
Syriza's junior coalition partner said it would vote only for certain clauses in the bill, rejecting those reforms that went beyond a previous vote in parliament that had given Tsipras a mandate to negotiate in Brussels. (Additional reporting by Gina Kalovyrna, George Georgiopoulos, Ingrid Melander, Karolina Tagaris, Michele Kambas in Athens, Alastair Macdonald and Jan Strupczewski in Brussels, Madeline Chambers, Caroline Copley in Berlin, Mark John and Yann Le Guernigou in Paris, William James in London, David Gaffen in New York; writing by Matthias Williams and James Mackenzie; editing by Philippa Fletcher, Peter Graff and David Stamp)