London, England (CNN) -- The days of discussions have ended, demands issued, concesssions made and a decision finally reached -- but even before they formed a government, the UK's political parties must wait for approval from one more person: The queen.
Labour leader Gordon Brown on Tuesday announced his resignation as prime minister and said he was recommending his Conservative rival David Cameron as successor.
As a head of state, Queen Elizabeth has numerous traditional roles when it comes to elections and government. Although these are usually no more than ceremonial, they are a key part of the protocol without which nothing can happen.
Before he could fully resign Brown asked the queen's permission. Likewise, David Cameron -- whose Conservative party is trying to form an alliance with the third placed Liberal Democrat to secure a parliamentary majority -- had to be invited by the queen to replace Brown.
The queen is the embodiment of Britain's constitutional monarchy and everything is done in her name. No laws can be passed nor parliaments opened or dissolved without her approval.
Such strict protocols bind all stages of the process to install a new prime minister -- often with a pomp and grandeur far removed from the boisterous world of British politics.
The 2006 film "The Queen" offered insight into this when Helen Mirren, playing the monarch, invites a nervous and kneeling Tony Blair to become prime minister after his 1997 landslide victory.
In her six decade reign, Queen Elizabeth has dealt with 11 prime ministers, including Winston Churchill and Margaret Thatcher, who reputedly had a tense relationship with the monarch during the weekly audiences that are also a traditional necessity.
Typically, although it is her role to anoint prime ministers, the queen does not get involved in the political process, remaining above the fray.
After an election, the queen will wait to see if the current prime minister gets a majority or assembles a coalition before inviting them to form a government. Only if they admit defeat and resign can she start to look elsewhere.
As negotiations to form a coalition progress, the queen will be kept informed from a distance, avoiding any direct involvement in the decision.
A high level group including her private secretary and the Cabinet secretary will brief her, but she will not be drawn into controversy.
But, in the unlikely event that no decision can be reached among the parties over who should become prime minister the queen does have powers to intervene.
She can, in theory, call a fresh election or stop a new election being called if she thinks there is another solution.
The queen has faced election hiccups before. The last was in 1974 when after days of party negotiations, she invited Labour to form a minority government. That administration lasted less than a year before Britain was back at the polls.
It usually falls to royal advisers to ensure the rules work and that the queen is kept well away from the political wheeling and dealing.