Rioters hurled petrol bombs at police who responded with tear gas during an anti-austerity demonstration outside parliament Wednesday, as Greek lawmakers began debating contentious measures needed to start negotiations on a new bailout and avoid financial collapse.

Groups of youths among the more than 12,000 demonstrators smashed storefronts and set at least one vehicle alight during the hourlong clashes. It was the first significant violence since the left-wing Syriza government came to power in January promising to repeal bailout austerity. Police said at least 50 people were detained.

The protest was timed to coincide with the start of debate on the bill, which includes consumer tax increases and pension reforms that will condemn Greeks to years of more economic hardship.

The bill has fueled anger among the governing left-wing Syriza party and led to a revolt by many party members against Prime Minister Alexis Tsipras, who has insisted the deal forged early Monday after a marathon weekend eurozone summit was the best he could do to prevent Greece from crashing out of Europe's joint currency.

"I must tell you, that Monday morning at 9:30, it was the most difficult day of my life. It was a decision that will weigh on me for the rest of my life," said Finance Minister Euclid Tsakalotos.

"I don't know if we did the right thing. But I know we did something with the sense that we had no choice. Nothing was certain and nothing is," he said as the debate kicked off.

Civil servants protested with a 24-hour strike that disrupted public transport and shut down state-run services across the country.

Large numbers of Syriza lawmakers are almost certain to vote against the package, though the bill is expected to pass with support from pro-European opposition parties.

Alternate Finance Minister Nadia Valavani resigned from her post, saying she could not vote in favor of the bill.

In a letter she sent to Tsipras on Monday and released by the finance ministry Wednesday, Valavani said she believed "dominant circles in Germany" were intent on "the full humiliation of the government and the country."

The economy ministry's secretary general, Manos Manousakis, also resigned over the agreement.

Tsipras agreed to a deal after a marathon 17-hour eurozone summit that ended Monday morning. It calls for Greece to pass new austerity measures his left-wing government had long battled against in return for the start of negotiations on a third bailout worth about 85 billion euros ($93 billion) in loans over three years.

The government, a coalition between Syriza and the small right-wing Independent Greeks, holds 162 seats in Greece's 300-member parliament. More than 30 of Syriza's own lawmakers have publicly voiced objections.

Tsipras has acknowledged the measures he agreed to go against his election pledges to repeal austerity, and described them in a Tuesday night television interview as "irrational."

But he said he had no option if he was to prevent Greece's financial collapse.

The International Monetary Fund, which was involved Greece's previous two bailouts and will also play a role in the third, has long argued the country's debt is too high and that any deal must include debt relief — something the Greek side has also insisted on.

In a report released late Tuesday, the IMF said Greece's debt was now "highly unsustainable" and would reach "close to 200 percent of GDP in the next two years."

On Wednesday, the European Union's executive Commission echoed that analysis, saying there are "serious concerns" about the sustainability of Greece's debt due to a worsening in the economy.

Tsipras has faced strident dissent even from top ministers, with Energy Minister Panagiotis Lafazanis saying in a post on his ministry's website that the deal the prime minister reached was "unacceptable" and calling on him to withdraw it.

The civil servants' strike disrupted public services. Pharmacies joined in with their own 24-hour strike to object to the austerity deal, which will allow some non-prescription drugs to be sold by supermarkets.

"These laws will pass through parliament today, because they can't do otherwise," said Eleni Sari, 45, as she walked through central Athens.

"Naturally, the people are furious, and they have not allowed them any choice. Unfortunately it's not in our hands anymore. That is, it's no longer in the people's hands. By necessity ... they will pass them in parliament, and by necessity we will bear their burden."

Greeks continued to struggle with limits on cash withdrawals and transfers outside of the country. Banks were shut down June 29 and the finance ministry said they would remain closed through Thursday.

With its banks dangerously low on liquidity and the state practically out of cash, Greece desperately needs funds. It faces a Monday deadline to repay 4.2 billion euros ($4.6 billion) to the European Central Bank, and is also in arrears on 2 billion euros to the IMF.

Negotiations on the new bailout will take an estimated four weeks, leaving European finance ministers scrambling to find ways to get Athens some money sooner.

The European Commission has proposed giving Greece 7 billion euros in loans from a special fund overseen by all 28 EU nations so it can meet its upcoming debts. The loan would be made pending the start of a full bailout program, but faces resistance from Britain, a non-euro member of the EU.

Germany argued one way for Greece to meet its financing obligations was for it to issue IOUs for domestic needs.