Greece's parliament is expected to pass a second austerity bill on Thursday to enable the country to avert bankruptcy by securing a 12 billion euro ($17 billion) loan tranche from the EU and IMF.

After two days of violent protests just meters (yards) from where deputies passed initial austerity legislation on Wednesday, they began debating detailed measures to implement 28 billion euros in spending cuts, tax hikes and privatizations.

With Greece perilously close to a default that would trigger chaos in financial markets, the European Union and the International Monetary Fund have demanded that both austerity bills be passed before it releases the next batch of a 110 billion euro bailout package agreed last year.

In a boost for Socialist Prime Minister George Papandreou, the conservative opposition said it was willing to support some measures in the second vote after having opposed the first austerity bill.

We will do what we can to support the government, said New Democracy lawmaker Nikos Dendias, a former justice minister. We will vote for two chapters of the bill today.

Parliament resumed debate at 9:30 a.m. (0630 GMT) and the decisive vote was not expected to begin before 2 p.m. (1100 GMT) with the results emerging some time in the afternoon.

Voting will be by roll-call, with deputies called on to vote on both the overall principle of the bill and individual articles. Papandreou has called a meeting of the cabinet after the vote.

While Socialist lawmakers were expected to back the legislation as a whole, some said they would oppose individual clauses, such as increases in a levy on heating oil and a rise in the minimum income tax threshold.

In an effort to win over waverers, new Finance Minister Evangelos Venizelos offered some concessions on tax, such as raising the tax-free threshold for families with children.

The first austerity bill, which outlined the tough program of cuts and selloffs, passed by 155 votes to 138. Approval of the second would allow eurozone finance ministers to clear the release of 12 billion euros at a meeting on Sunday.

Approval by the IMF would be expected on July 5, averting the immediate threat of default.

After that, attention will switch to a second rescue package, roughly equivalent to the 110 billion euro bailout agreed in May 2010, which Greece needs to keep going until 2014.

PROBLEMS AHEAD

World stocks rallied on Thursday for the third day running and the euro rose to its highest dollar level in 20 days on a feeling of relief that Greece looked set to avoid the euro zone's first debt default.

Calm returned on Thursday to central Athens, which ground to a halt during a 48-hour strike by powerful public and private sector unions and by two days of violent demonstrations which blocked the city center.

Teams of street cleaners swept up broken masonry and shattered glass after a night of clashes in the area around Syntagma Square just in front of parliament.

But tents and protest banners remained in Syntagma Square where demonstrators have camped for more than a month to show their anger at austerity measures driving many Greeks to desperation during the worst recession since the 1970s.

The implementation law will pass, without problems, said Costas Panagopoulos, head of ALCO pollsters. The problem for Papandreou is not in parliament, it is what is happening outside parliament: not in Syntagma Square which is just a few hundred protesters, but with the whole of Greece's 11 million people.

With ordinary Greeks facing years of falling living standards as the government struggles to cut down a debt mountain equivalent to more than 150 percent of gross domestic product, turning the laws into action will be a major challenge.

Unions have vowed to oppose privatizations and other austerity steps. The Socialists, who halted Greece's privatization process when they came to power, must sell off 5 billion euros in assets this year or risk missing the targets under its EU/IMF program, which would cut off funding again.

If Papandreou and Venizelos miss this last chance and do not proceed with the needed reforms and a real shrinking in the wasteful state, they and the country will face an explosive situation in the autumn with no way out, wrote center-right daily Kathimerini in an editorial.

(Additional reporting by Harry Papachristou and George Georgiopoulos; writing by James Mackenzie; editing by Mark Heinrich)