By George Georgiopoulos and Matthias Williams
ATHENS, July 13 (Reuters) - Greek Prime Minister Alexis Tsipras flew back to Athens on Monday to try to ram a controversial bailout deal he secured from creditors through parliament, as anger mounted at more painful austerity measures that could fracture his government.
A sleep-deprived Tsipras has until Wednesday night to quell dissent within his own ranks -- probably by sacking hardliners -- and get unpopular measures passed that include higher value added tax and pension reforms.
With dozens of potential rebels in the ruling Syriza party, Tsipras will need the support of opposition lawmakers to pass the package, opening doubts over the stability of his government and raising the possibility that he could give way to a caretaker prime minister.
There were no details on when and how the reform laws would be tabled. One obstacle could be the speaker, Zoe Constantopoulou, who is key to the logistics of the voting and who has been one of the creditors' fiercest critics. One -- potentially risky -- move could be tabling a no confidence vote to sack her.
While there was relief that the country had escaped bankruptcy and a collapse of its banking system, Greeks vented their fury at an agreement that ended up much tougher than proposals they had roundly rejected in a referendum on July 5.
Before the final contours of the deal were even known, one of his ministers railed against the deal as being "unviable" and predicted there would be a snap election within months.
On the streets, reaction was equally blunt.
"Listen, it is some sort of victory but it is a pyrrhic victory because the measures are very strict," Marianna, 73, told Reuters on an Athens street.
"People have suffered the past five years and there is more to come now. This is what makes things difficult for us. We wanted to stay in Europe, it goes without saying that we did. But what about the terms?"
Tsipras was meeting his aides and was due to meet the head of his coalition ally, who had declared certain tax hikes and defense spending cuts as so-called "red lines."
Their economy pummel by years of recession, their banks shut and dozens of businesses closing daily, some Greeks vented their anger on German Chancellor Angela Merkel and Finance Minister Wolfgang Schaeuble.
Newspapers laced the morning's headlines with references to World War Two and railed against what they see as Berlin's attempts to humiliate Greece as punishment for its resistance to another round of cuts.
"Germany unfortunately for a third time in 100 years is attempting to destroy Europe," Nikos Filis, the parliamentary spokesman for Syriza lawmakers, said on local television.
"Germany attempted to bring the Greek government down and take Greece outside the euro zone," he said. "We had the illusion that democracy works in Europe when it comes to relations between the nations."
In particular, Greeks bristled at Schaeuble's proposal -- not included in the final deal -- for a temporary Greek exit from the euro zone, which many saw as tantamount to expulsion by stealth.
"Greece in Auschwitz, Schaeuble seeking a holocaust in Europe," Demokratia newspaper said.
The German occupation of Greece during the war has become a recurring theme during months of increasingly fractious bailout talks between Athens and its creditors. Constantopoulou at one point demanded war reparations from Berlin and set up a committee calculating the current value of a loan Greece was forced to make to Germany during the occupation.
"Sink the country, Wolfgang Schaeuble orders," the left-leaning daily Efimerida Ton Syntakton said.
Although the country might have pulled back from the brink of financial meltdown, Greeks will have to endure more pain. Capital controls that limit daily withdrawals from bank accounts to just 60 euros will likely to remain in place for some time, and the finance ministry said on Monday banks would remain shut.
"I'm disappointed," said Christina, 43, a private sector employee in Athens. "They (the government) were very dynamic at first. We had a glimmer of hope. We were prepared for something bad to happen and then the worst happened. This is what most people think."
Protesters will gather in central Athens on Monday evening to rally against the agreement, while a union of civil servants announced a 24-hour strike on the day the reforms would be voted on in parliament. Hardliners in the ruling Syriza party were also spoiling for a fight.
"After 17 hours of negotiations, the leaders of the euro zone concluded with an agreement that is humiliating for Greece and its people," the party's hard-left faction said in a statement on its website. "It is a new harsher bailout that re-establishes the troika and maintains the country under a status of a debt colony under German-led EU custody.
"The Greek people must not become disappointed, on the contrary it must remain stubborn, as it did in the referendum and the countrywide protests for a 'No' to the very end. A 'No' to clash with the bailout, neo-liberalism and austerity which are institutionalized in the euro zone." (Additional reporting by Georgia Kalovyrna, Phoebe Fronista, James Mackenzie, Renee Maltezou, Michele Kambas and Lefteris Karagiannopoulos; Editing by Sonya Hepinstall and Philippa Fletcher)