Election 2015: And the winner is? Er…

David Cameron, Nick Clegg and Ed Miliband Image copyright Getty Images

By 10 o'clock on Thursday evening the people will have spoken but the questions which will then follow look likely to be - "What on earth did they mean by that? Who actually won? Who has the right to govern?"

Unless the polls are wrong - which they very well might be - and unless there is a late switch in opinion - which there still could be - most players and pundits are now expecting an election that is too close to call and may produce a result which could allow for either David Cameron or Ed Miliband to become prime minister.

So, what is obsessing politicians of all parties behind-the-scenes is the debate about what a legitimate government would look like.

You might think that's simple - one led by the winning party - but think again. In politics things aren't nearly so neat and simple as that. What's more your definition of what is a legitimate government tends, surprise surprise, to be shaped by how it helps the party you support.

So, what are the competing arguments?

1. A legitimate government is led by the party which "wins" - ie wins the most MPs and votes

Image copyright PA
Image caption Ed Balls has said the biggest party normally forms a government

Conservatives and their cheerleaders in the Tory press are most likely to argue that the party that "wins" has the right to govern. That's because even if they don't win in the proper sense - ie gaining a majority of seats in Parliament - they do expect to get more MPs and more votes than Labour.

If that happens they will argue that the prime minister would have the right to stay in office in the eyes of most voters.

They may get some support in making this argument from Nick Clegg who has said that the Lib Dems will talk first (but not exclusively) to whoever has the most seats and votes. He may argue - as he did in 2010 - that the public would not tolerate a government made up of parties that came second and third.

Even Labour figures such as Ed Balls and Lord (Jack) McConnell have pointed out that the winning party "normally" forms a government. They did so to try to persuade Scottish voters that they were taking a risk by voting for the SNP not Labour.

But - and it's a mighty big but - the only constitutional test of legitimacy which is recognised by the House of Commons, Buckingham Palace and the civil service is…

2. A legitimate government is one supported by a majority of MPs (of whatever party)

Image copyright Reuters
Image caption A key test is whether a government can pass its Queen's Speech

You can't be prime minister unless you have the support of enough MPs to pass the laws you propose and to raise the money you need. The tests of this are whether the House of Commons votes for the Queen's Speech - the government's "to do" list of new laws for the year ahead - and for its Budget - without which the Treasury would run out of money.

So, if - and it is still an if - Labour come second but could govern with the support of, or at least without being opposed by other parties, they will argue that it is not just legitimate but right and proper for Ed Miliband to become prime minister.

There is a historical precedent - though not a particularly happy one for Ed. The first ever Labour government came to power in 1924 in just this way when Ramsay MacDonald became PM with the support of Herbert Asquith's Liberals. MacDonald is still seen as a class traitor in some Labour households where his picture hangs but faces the wall.

The SNP are leading those who make the case that it doesn't matter who comes first in large part to counter the Labour argument in Scotland that a vote for the SNP is a vote for David Cameron to stay in Downing Street.

But last night Nicola Sturgeon also unveiled another argument...

3. A legitimate government must be backed by all parts of the UK

Image copyright PA
Image caption Nicola Sturgeon has argued a government that only wins in England may not be legitimate in Scotland

Last night Scotland's first minister argued that a government that had only won in England would not be legitimate in the eyes of many Scots. Given that Nicola Sturgeon favours breaking up the UK you might argue that she would, wouldn't she, but she will not be alone.

Some may argue that a Labour government backed by the SNP, Plaid Cymru and Northern Ireland's SDLP has a claim to speak for all the people of these islands whereas a Tory-led government would govern on behalf of England alone.

Now all these arguments will, in the end, be shaped or made irrelevant by the actual results. The reason politicians are obsessing now is that all party leaders know that there will be a new battle for public opinion which is set to begin in the early hours of Friday morning - which they need to win.

BBC News Timeliner

Image copyright BBC/Getty Images

Winners and losers. Laughter and tears. Celebrities and the general public. Find echoes of the current campaign on a trip through the archive of elections past.

Watch video from the vaults on the BBC News Timeliner

Play our interactive hung parliament game