The Greek parliament has approved a deeply unpopular austerity bill to secure a second bailout from the European Union and International Monetary Fund and avoid a messy default.
The bill, which was passed in the early hours of Monday morning, sets out 3.3 billion euros ($4.35 billion) in wage, pension and job cuts for this year alone.
In the hours leading to the vote, an estimated 100,000 protesters were massed outside the building and at nearby Omonia Square, with some 6,000 police deployed and more protesters arriving. At least five building were in flames in downtown Athens, including a bank, mobile phone shop, glassware store and a cafeteria.
Al Jazeera's John Psaropoulos, reporting from Athens, said the protest on Sunday began peacefully but had rapidly descended into violence from both police and protesters.
"There is absolute mayhem in the square outside parliament. Thousands of [people] who started peacefully have not been budged by all the tear gas and stun grenades," he said.
Lucas Papademos, the Greek prime minister, denounced the violence, saying late on Sunday from parliament that vandalism and destruction "have no place in a democracy and will not be tolerated'' in comments aired on national television.
Papademos said Greece doesn't have the luxury of such protests "at these crucial times".
Al Jazeera's Barnaby Phillips, who arrived in Athens as the violence was escalating, described the atmosphere as "surreal".
"The air is thick with tear gas and there are debris and rocks everywhere. I'm now standing by a cinema, and it is no more. It's going up in flames and firefighters are struggling to control it," Barnaby said.
He continued: "I'm looking back now at another building on fire. It's quite surreal the scene here."
Despite the increasing violence in the streets, Al Jazeera's Psaropoulos pointed out "the real news is occurring inside parliament".
"What this evening is about is the real concern about the deep cuts and the very deep public displeasure that surrounds them," Psaropoulos said.
The two remaining parties in the ruling coalition, Socialist PASOK and conservative New Democracy, backed the measures and account for 236 out of a total of 300 deputies, but some MPs are certain to reject the package.
The debate came after the prime minister warned that the nation was approaching "Ground Zero".
"We are a breath away from Ground Zero," Lucas Papademos said in a televised address on the eve of the vote, urging deputies to grasp their "historic responsibility" to secure the country's financial future.
Papademos warned of "economic and social catastrophe" if parliament failed to agree the cuts required to obtain a second massive bail-out from the EU and IMF, to the tune of $171bn, and avoid default.
There are also signs of growing unrest in the government ranks. Two PASOK junior ministers and four members of the far-right LAOS party have quit the cabinet in protest in the run-up to the vote.
The country's unions held a 48-hour strike and called the fresh demonstration on Sunday in front of parliament to protest what they say is the blackmail being imposed by the international troika of the EU, the IMF and the European Central Bank.
Members of parliament approved moves to recapitalise Greek banks, which may involve a degree of nationalisation if they cannot get sufficient private money.
And they backed a bond swap which, after long and tortuous negotiations, has finally been agreed with private creditors.
That is designed to wipe out around 100bn euros from Greece's 350bn euro debt, reducing the country's massive debt burden to 120 per cent of GDP.
If deputies had rejected the package, Greece would not get the money it needs to stave off bankruptcy on March 20, when it has to repay nearly 14.5bn euros in maturing debt.
"We look into the eyes of the Greek people with full consciousness of our historic responsibility. The social cost of this programme is limited in comparison with the economic and social catastrophe that would follow if we do not adopt it," Papademos said in his televised address.
"The standard of living of Greeks would collapse in the case of a disorderly bankruptcy. The country would drift into the long spiral of recession, instability, unemployment and prolonged misery."
The state would be unable to pay salaries, pensions or even maintain basic services such as hospitals and schools, he warned.
"The programme contains measures that should have been adopted long ago," he said.