Athens, Greece (CNN) -- Greek lawmakers Wednesday approved a package of austerity measures demanded by international lenders, despite protests outside Parliament as they were voting, in a move that should clear the way for an emergency loan to Athens.
Greek riot police fired round after round of tear gas to keep small crowds of protesters away from Parliament in the run-up to the vote and as lawmakers one by one said "Yes" or "No."
The vote was 155 to 138 in the 300-seat house, with five voting "present" and two abstaining.
Crowds outside Parliament swelled as the vote took place, but both sides showed some restraint, with police and demonstrators eyeing each other warily rather than wading into the melee.
Before the vote, small numbers of demonstrators hurled stones at police, chanted, waved Greek flags and set small fires to protest the austerity measures, which include new taxes and job cuts.
At least 19 police officers were injured Wednesday, police said.
Dozens of people have gone to hospitals with breathing problems, police said.
Andreas Lourandos, the president of the Pharmacists' Association of Athens, called on police to "stop using chemicals before we mourn any victims."
A second key vote is due in the Greek Parliament Thursday on how the five-year austerity package will be implemented.
German Chancellor Angela Merkel called Wednesday's passage of the austerity measures "really good news," German government spokesman Steffen Seibert said on Twitter.
Euro group chairman Jean-Claude Juncker also welcomed the news, saying the "way is now clear" for Athens to receive the fifth instalment of a huge bailout loan from European Union countries and the International Monetary Fund.
Greece has debt payments coming due in mid-July and needs the $17 billion in emergency funds to be able to pay them -- but lenders, including the IMF and EU, had demanded that it approve the austerity measures in order to get the loan.
European and international lenders agreed last year to give Greece a $156 billion bailout package as its deficit soared, but were threatening to hold up an installment of $17 billion due soon.
A default by Greece would send shock waves through the European banking sector and potentially dent global economic confidence.
Juncker said in a statement from Brussels: "I'm very happy and relieved that the Greek Parliament followed the government and voted in favour of a new program of structural reforms and budgetary adjustment."
Unions oppose the austerity package, but its backers say it is essential to the stability of the Greek economy, the euro, and the global financial system.
Riot police clashed with stone-throwing demonstrators Tuesday ahead of the vote, firing tear gas to disperse protesters during riots that left 30 police officers and one demonstrator injured.
The two-day general strike is continuing on Wednesday, with members of three major unions planning to march on Parliament after the vote.
The 48-hour general strike kicked off early Tuesday, hobbling most of Greece's transportation systems but freeing workers to participate in demonstrations.
Transportation disruptions took place on land, on sea and in the air.
Air traffic controllers periodically stopped work and flight traffic, according to their union. Stoppages also disrupted sea travel in the maritime nation, which encompasses many islands.
The Greek government hopes for a second bailout package to stay afloat, but that, too, depended on its passing the austerity measures before Parliament on Wednesday.
Protesters lament that the cuts are being carried out on the backs of those who can afford it least.
CNN's Elinda Labropoulou, Diana Magnay, Frederik Pleitgen and Eve Parish contributed to this report.