THE new Prime Minister could be in place early tomorrow morning – or his identity may not be known until the end of the month.

The decision could be made quickly by the voters – or slowly by the party bigwigs in frantic discussions in what used to be called smoke-filled rooms, or even by advisors to Her Majesty.

One scenario has Chancellor Alistair Darling and Children’s Secretary Ed Balls clinging onto their jobs even if they lose their seats – all in the interests of stability to avoid a damaging run on the pound.

Yes, it could be one hell of a ride if this tightest General Election for 20 years does end in a hung parliament – with the clues to what happens next found in two memos released in the campaign run-up.

One was penned recently, by Cabinet Secretary Sir Gus O’Donnell, making clear that Gordon Brown will not be required to quit No 10 if the Conservatives – even while winning the most seats – have fallen short of an overall majority.

Instead, nearly two weeks of bargaining could follow, while the Labour leader haggles with the Liberal Democrats and the Nationalists on a programme that can “command the confidence of the Commons”.

Parliament will not meet until May 18 and the Queen’s Speech is a full week later, in theory allowing nearly three weeks of bartering – although the hysterical Tory press would be demanding a military coup long before then.

Big policy announcements would be outlawed in the meantime. Intriguingly, ministers would remain in post, even if they had lost their seats. Mr Darling and Mr Balls are both vulnerable.

The second key memo is much older, dating back to the February 1974 election, the last to produce a hung parliament. Stamped “secret”, it was released under Freedom of Information rules.

Over 19 pages, Cabinet Secretary Robert Armstrong remembers the nail-biting drama over the next few days, as sitting PM Edward Heath wrestled with his options and flirted with the Liberals.

Incredibly, Liberal leader Jeremy Thorpe’s phone in his Devon farmhouse did not work – holding up talks – and he eventually sneaked out in disguise to dodge the waiting media and catch a train to London.

After winning four fewer seats than Labour, Mr Heath was forced to abandon the talks by Monday morning. If Mr Brown has lost badly – perhaps ending up 60 to 80 seats short of the Tories – he would, surely, be forced to do the same.

For a Lib Dem-Lab deal to succeed, the Labour Cabinet would then need to install a new leader within days (which seems unlikely) or allow Nick Clegg to become Prime Minister (which seems unthinkable).

It is far more likely that David Cameron would be invited to form a minority government.

His talks with the Lib Dems are likely to be short and unsuccessful, given implacable Tory opposition to voting reform.

Once on the front foot, the Tories would dare the Lib Dems to vote down their Queen’s Speech – knowing that the public would wreak revenge on any party forcing a second election.

That is why, one way or another, Mr Cameron is likely to be Prime Minister, perhaps tomorrow, perhaps on Monday. However, if hamstrung by a minority rule, he will be in office – but not truly in power.