Labour's grip on power in Wales was slipping last night, as the focus for control of its Assembly shifted to the prospect of a rainbow alliance led by Plaid Cymru.

Liberal Democrats walked out of coalition talks with Labour, saying they were more interested in pursuing negotiations with Conservatives and Plaid Cymru.

With Plaid Cymru the second largest party in the Cardiff chamber, it could leave Gordon Brown as Prime Minister while Nationalists lead administrations in both Scotland and Wales.

Labour was left with 26 of the 60 seats in the Cardiff chamber after the May 3 election, four down on its previous position in a precarious minority administration. Its leader, Rhodri Morgan, admitted the result was a "clip round the ear" from the electorate.

He claimed only Labour has the legitimacy to lead the administration, in an echo of a claim made also by SNP leader Alex Salmond earlier this month when he was arguing against the possibility of a unionist alliance against the SNP as largest party at Holyrood.

He could do what Mr Salmond is now attempting, by trying to run another minority administration, but having attempted that, he has made it clear he wants to avoid the uncertainty of that.

As the initiative slipped away from Labour, Mr Morgan conceded: "We don't have a natural right to govern.

We have to accept that in the verdict of the electorate on May 3, we got a clip round the ear. We know that and that's why we are seeking a partner."

It appeared last night that Mr Morgan's best hope of staying on and stopping Plaid leader Ieuan Wyn Jones becoming First Minister is to convince the Nationalists to support a minority Labour administration.

The Nationalist party has 15 Assembly members, Tories have 12, LibDems six and there is one independent.