What happens in a hung parliament?

Just hours until the voting booths open, the opinion polls still suggest no one party has enough support to win a clear majority in tomorrow's general election. So what would happen then?

Enable JavaScript to play video.

What next for Gordon Brown?As the 'incumbent', existing holder of the office, prime minister Gordon Brown would remain in office at Number 10 - unless he resigns.

Can Brown be forced out of Number 10?An incumbent government is allowed to stay in Number 10 and wait until the first meeting of the new parliament to see if it can command the confidence of the House of Commons.

When Brown called the dissolution of parliament in March, he slated the first day of the new parliament for Tuesday 18th May.

"Governments hold office by virtue of their ability to command the confidence of the House and hold office until they resign," the Cabinet Secretary Sir Gus O'Donnell's briefing says.

Tell me more about commanding the confidence of the HouseThe government needs to hold the confidence of a majority in the House of Commons.

If the House votes to indicate that it has no confidence in the government - either by defeating the government on a confidence motion or by defeating a policy that the government has indicated is a 'matter of confidence' - then the government must resign or call a General Election.

If an incumbent government retains a majority in the new parliament after the general election it will continue in office and resume business as usual.

Traditionally, votes on the Queen's Speech are regarded as motions of confidence. The Queen's Speech is usually delivered by the government upon the State Opening of Parliament which is expected a week after the new parliament is sworn in.

If Brown loses in the vote on the Queen's Speech, he would be expected to tender the government's resignation immediately to the Queen - or seek a dissolution of parliament.

What happens if Brown resigns?If Brown hands his resignation, he would advise the Queen to the person most likely to be able to command the confidence of the House.

It is the responsibility of the political parties to determine who that person should be. The Queen would not be expected to be involved in these discussions.

"Where a range of different administrations could potentially be formed, the expectation is that discussions will take place between political parties on who should form the next government," the Cabinet Office says.

These principles "underpin" the appointment of a prime minister and a formation of a government in "all circumstances", it adds.

Can Brown call for another general election?The prime minister could ask the Queen to dissolve parliament in order to hold another general election. However, the Queen is not bound to accept the request, especially if he was to ask soon after a previous dissolution.

What can rival political parties do?Rival parties may attempt to call a motion of confidence ahead of the Queen's speech - if for example they have struck a coalition deal. Again, if the government was unable to gain the confidence of a majority in the House, it would be forced to resign or dissolve.

"A motion of confidence may be tabled by the Opposition, or may be a measure which the government has previously said will be a test of the House's confidence in it. Votes on the Queen's Speech have traditionally been regarded as motions of confidence," says the Cabinet Office.