Greek Prime Minister George Papandreou, assailed by violent demonstrations and political defections, fought on Thursday to form a cabinet that would back painful measures to avoid defaulting on the national debt.

The political drama in Athens, where efforts to form a national unity government collapsed on Wednesday, rocked financial markets already spooked by dithering in Europe over a second bailout for Greece.

At stake is not just the fate of Papandreou's government but the credibility of the euro, with a European Central Bank policymaker warning that the insolvency of a member state would be devastating for the whole of the 17-nation currency bloc.

The prime minister worked on Thursday night to reshuffle his cabinet with a team committed to an austerity package demanded by the European Union and International Monetary Fund in return for billions of dollars in rescue funds.

Our response to the challenges we face is stability and to stay on our course of reforms, Papandreou told a parliamentary caucus meeting called by critics of his austerity policies.

He said he would continue to seek wider political consensus despite the failure of talks on Wednesday with the conservative opposition in which he offered to step aside if there was commitment to the reforms.

The euro hit a record low against the Swiss franc and slid against the dollar and the yen as investors fled to safe-haven assets on mounting concerns that Greece's problem were far from resolution. The cost of insuring Greek debt against default hit another record high.

In a statement intended to soothe markets, the European Union's top economic official, Olli Rehn, said he expected the EU and IMF to release a crucial 12 billion euro ($16.97 billion) loan tranche in early July to keep Athens afloat.

But Rehn acknowledged it would take longer to put together a second rescue package for the heavily indebted state due to differences over how to make private investors share the burden.

I am confident that next Sunday, the Eurogroup (of euro zone finance ministers) will be able to decide on the disbursement of the fifth tranche of loans for Greece in early July. And I trust that we will be able to conclude the pending review in agreement with the IMF, he said.

An IMF spokeswoman said continued financial support depended on Athens adopting agreed economic policy reforms and approval by the Fund's board, where emerging nations are growing critical of pouring more money into Europe.

Progress is being made in the discussions to ensure the full financing of the program, and we anticipate a positive outcome on this at the next Eurogroup meeting, she said.

ATHENS TURMOIL

Two of Papandreou's Socialist deputies quit on Thursday in protest at the austerity measures, and other disgruntled party members voiced anger at his handling of the situation.

We are not governing the country the way we should... We are going from depth to depth, from dilemma to dilemma, ruling party deputy Nikos Salayannis said outside parliament.

Prospects of a disastrous, disorderly outcome to the Greek crisis are beginning to show up on financial markets even though many investors still don't think it will happen.

This does nothing to reduce fears that some form of default will eventually take place, Ben May of Capital Economics said after the resignations.

European officials also expressed their exasperation at the political bickering in Athens.

I can't believe they are doing this (political wrangling), with all the money they are being offered, a European central banker told Reuters on condition of anonymity.

In the latest warning from the European Central Bank, policymaker Yves Mersch said a disorderly insolvency of a euro zone state would have devastating effects for the whole currency bloc and a new financial crisis would be more than likely.

The White House also weighed in, saying that the Obama administration was staying in close touch with European leaders over the Greek crisis, but that it expected the common currency bloc to solve the problem.

Finance Minister George Papaconstantinou, who is trusted by global lenders and investors, may be sacrificed in the reshuffle due to the deep unpopularity of the austerity plan needed to satisfy the EU and the IMF in return for Greece's 110 billion euro bailout last year, government sources said.

Former ECB Vice-President Lucas Papademos is most frequently mentioned as a candidate to replace Papaconstantinou, who Greek media have said may be on his way to the Foreign Ministry.

Papademos' office said he was out of the country on Thursday and not available for comment.

AUSTERITY

Tax rises and spending cuts worth 6.5 billion euros ($9.4 billion) are planned this year, doubling already agreed measures that have driven unemployment up to a record 16.2 percent and extended a deep recession into its third year.

The austerity plan includes a crackdown on tax evasion and new taxes on luxuries like yachts. The euro zone member's 750,000-strong state workforce would be cut by a fifth. It also aims to raise 50 billion euros by selling off state-owned firms.

On Wednesday, tens of thousands of Greeks massed outside parliament to demonstrate against the measures, while rioters hurled petrol bombs at the Finance Ministry and police fired tear gas to break up the crowds.

Analysts said the midterm plan was likely to be passed, but putting it into action would present further hurdles.

I think that Greek politicians are mature enough and will vote for the midterm plan, said Gikas Hardouvelis, chief economist at EFG Eurobank. What they don't have is the maturity to implement the hard austerity measures that it includes.

The risk premium on the bonds of several other euro zone sovereigns -- including Spain and Italy -- also rose as investors fled to safe-haven German bunds.

Ireland's finance minister added to market jitters by saying on Wednesday that Dublin would seek to impose losses on senior bondholders in nationalized Anglo Irish Bank and Irish Nationwide Building Society .

The European Commission, which has opposed such a move in the past, said it had not received any proposal from Ireland, and Irish Deputy Prime Minister Eamon Gilmore said Dublin had yet to raise the issue with the ECB.

Trade in European money markets showed growing fear that banks may stop lending to each other because of their exposure to Greece, though tensions were not as severe as during the global credit crisis of 2007-2009, when the market froze up.

The one-year euro/dollar currency basis swap spread, which rises when banks become unwilling to supply dollars to each other, widened to 37 basis points, its widest since February, from around 23 bps on Wednesday.

It hit 55 bps when the Greek crisis erupted early last year, and 120 bps after Lehman Brothers collapsed in 2008.

(Additional reporting by Tatiana Fragou, Ingrid Melander and George Georgiopoulos in Athens, Daniel Flynn in Paris, Ilona Wissenbach and Jan Strupczewski in Brussels, Noah Barkin and Andreas Rinke in Berlin, Philipp Halstrick in Frankfurt; Writing by Paul Taylor and Hugh Lawson, editing by Barry Moody)