Greece's ruling socialist party has passed a second austerity bill needed to implement an austerity package to secure more funds from the European Union (EU) and the International Monetary Fund (IMF).
The vote saw 155 members of parliament voting in favour of the bill, 136 voting against and five abstentions.
After the vote, George Papandreou, the Greek prime minister, said his country has "won a difficult battle".
Politicians voted on Thursday on the second of two austerity bills that are key to receiving funding, after endorsing an initial law on Wednesday to slash $40bn off the national debt.
The government of prime minister Papandreou won the first vote by 155 to 138 votes on Wednesday.
But the package of taxes, spending cuts and privatisations has angered many Greeks, with thousands taking to the streets, and police clashing overnight with protesters ahead of Thursday's vote.
Protesters said they will continue to rally in Athens despite the passing of the bill.
Thousands of people gathered outside Greece's parliament to say they will only leave if the austerity measures change or early elections are called.
Central Athens, grounded to a halt during violent protests and a 48-hour strike by powerful public and private sector unions. Teams of street cleaners on Thursday swept up broken masonry and shattered glass after the night of clashes.
Al Jazeera's Barnaby Phillips reporting from Athenssaid: "Syntagma square was a battleground for two days; the air thick with acrid tear-gas."
"They [police] are certainly on alert," Philips said. "But at the moment it's all about a clean up in the city centre after two days of violence and a two day general strike," he added.
The five-year austerity package will allow Greece to secure a second bailout of $17bn of emergency loan funds from the EU and the IMF on top of last year's $157bn bailout.
Papandreou, who reshuffled his cabinet earlier this month to secure support for the bills, said he was determined to push through reforms.
"Today, I am more determined than ever," he said earlier. "Now is the time to tackle everything that is wrong with everything that hurts us, that holds us back."
Across Europe, officials hailed the first vote as an act of "national responsibility."
"That's really good news," German Chancellor Angela Merkel said on her way out of an economic forum in Berlin. Germany is Greece's biggest creditor.
Relief was the main response from the markets. Soon after the vote, the euro rose against other world currencies, including the American dollar.
Investors around the world cheered the news, but protesters, fighting tear gas, hurled whatever they could find at riot police and tried to blockade the parliament building.
Christine Lagarde - named the next head of the IMF - called on Greece's opposition parties to offer support. The IMF provides about 30 per cent of Greece's bailout fund.
European Commission President, Jose Manuel Barroso and European Council President, Herman Van Rompuy, said in a statement that the Greek parliament's approval of the bill is a "vital step back" from a debt default.
Unions to continue agitation
Thursday's vote enables individual budget measures and creates a privatisation agency, but unions have vowed to oppose privatisations and other austerity steps.
Clashes between police and protesters broke out outside parliament, with the booms of stun grenades and tear gas resonating across the square outside the parliament on Wednesday.
Riot police fired volleys of tear gas at swarms of young men who were hurling rocks and other debris as well as setting fire to rubbish containers.
Most of the anti-government protesters who marched to the square stayed clear of the fighting, but they vented their anger at the political establishment with chants and insults.
Speaking to Al Jazeera, Matina Stevis, a Greek journalist, said: "I can almost hear the sighs of relief from the rest of Europe, but this is not good news, it has been an incredibly dramatic day in Athens."
Stevis said that she was worried that the austerity package was too harsh and unimplementable.
Source: Al Jazeera and agencies