ATHENS (AFP/Reuters) - Thousands of demonstrators besieged the Greek parliament Wednesday as lawmakers debated new austerity measures inside on a day of protests marred by clashes between riot police and gangs of youths. Greece's prime minister offered to quit and make way for a national unity government after mass protests against a new austerity plan turned violent on Wednesday, with the country teetering on the brink of default. Senior government sources said Socialist Prime Minister George Papandreou told the leader of the conservative opposition he would be willing to step aside if a unity cabinet agreed on a clear plan to meet the terms of an IMF/EU bailout. "PM Papandreou talked with Mr (Antonis) Samaras today and proposed that if the two agreed on a framework of specific commitments for change in the country and the political system and specific targets, he would be willing to stand down from his office," one government source said. Some 40,000 people, according to media estimates, joined the mass protest in Athens which was timed to coincide with a general strike, the third this year. Another 20,000 people gathered in the main northern city of Thessaloniki, police said. The show of force in Athens was organised by a protest group that has peacefully occupied the central Syntagma Square for weeks, modeled after a similar anti-govt mobilisation in Spain. The demonstrations were initially peaceful, with only sporadic scuffles breaking out at barricades thrown up by police around parliament where lawmakers were debating a controversial new round of austerity cuts. But the violence escalated when scores of hooded youths began throwing stones, bottles and firebombs at riot police, who responded with heavy discharges of tear gas. Clashes also broke out between the attackers and protesters struggling to restore order. The semi-state Athens News Agency said at least nine people including a prominent television journalist had been injured, and the police department said five of its own officers were also hurt, some seriously. "We have two-three officers who are in a serious condition," police spokesman Thanassis Kokkalakis told private Skai TV. "One of them was hit in the ear by a flare and another has lost a number of fingers on his hand," he said. Two people were arrested, Kokkalakis said. The protest was designed to maximise the heat on the govt on a day when public transport and key services were paralysed by the general strike. PM George Papandreou had earlier held an emergency meeting with President Carolos Papoulias, the day after the government's parliamentary majority was reduced to just five seats by a lawmaker's defection. Lawmakers are debating a new austerity package worth over 28 billion euros ($40 billion), a condition demanded by Greece's creditors in return for a badly-needed new aid bailout. The plan is to be voted on by the end of the month. "A national effort is demanded, we face critical decisions," Papandreou said ahead of the meeting in televised statements. "We will take the necessary decisions to take the country out of the crisis ... (but) everyone must accept their responsibilities," the premier said, calling on opposition parties to support the austerity drive. A similar event in Portugal prompted the collapse of a Socialist government followed by snap elections that were won by a centre-right party. Reports said the government may seek to force opposition deputies to shoulder some responsibility for the reform package by setting a minimum majority for its passage of 180 votes in the 300-seat body, 25 more than the ruling party holds. But Greece's right-leaning main opposition party insists it will vote against the measures. Greece has warned it will be unable to pay next month's bills without a 12-billion-euro loan instalment from the EU and the IMF, part of a broader 110-billion-euro bailout package agreed last year. But the creditors have warned that no more aid will be forthcoming without firm reform commitments from Athens. Tension has been rising in Greece in the past few days with protestors voicing their discontent over plans for a new wave of spending cuts and tax hikes. Many Greeks are angry that additional sacrifices are demanded after billions of euros in spending cuts and tax hikes last year. "The politicians lied to us," said Maria Chira, a 30-year-old mother of two. "Greece is in danger, this is the most important mobilisation since the seventies," she said, referring to a student uprising that helped bring about the collapse of a military dictatorship in 1974. "We no longer have our fates in our hands," added 70-year-old Machi Spyridaki. "I am here to defend our country's pride and the future of my children and grandchildren who are destined to a life of unemployment and poverty wages," she told AFP. Eurozone finance ministers failed to reach accord at talks on Tuesday on a second bailout package to avert a possible Greek default. Opinion polls show most Greeks have lost confidence in their country's government and a political and judicial system that has conspicuously failed to root out endemic corruption.