Boris Johnson has agreed to resign – with a new Tory leader set to be in place by the party’s conference in October.
So what happens now? Who is running the country and how will the government function between now and then?
There are still many possible scenarios that cannot be predicted but this attempts to answer some of the questions the next couple of days may present.
Politics Hub: Johnson makes ‘painful’ resignation statement to country – live reaction
How does Boris Johnson cease being prime minister?
Boris Johnson has said the timetable for his departure will be released next week.
When Theresa May agreed to stand down in 2019, because she could not get her Brexit plans through parliament, she set the date on which she would formally resign as leader of the Conservatives.
In her case, it was about two weeks after she made the 24 May statement saying she would step down.
The exact date of Mr Johnson’s departure is being negotiated between Mr Johnson and Graham Brady, the chairman of the 1922 Committee of backbenchers, that sets the rules for how the parliamentary Conservative party operates.
Mr Johnson’s formal resignation opens the way for a leadership contest to begin.
How is a new leader elected?
The Conservative Party has to elect a new leader to replace Mr Johnson.
It begins with the 1922 Committee inviting nominations from Conservative MPs who wish to take over and setting a deadline for applications.
In the immediate aftermath of Mr Johnson’s resignation statement, it is likely a number of candidates will emerge – MPs declaring they intend to stand.
The exact number of candidates won’t be known until the deadline has passed.
They then face rounds of voting among Conservative MPs to choose a final pairing.
The first to be eliminated are those who get less than 5% of votes from the parliamentary party.
The next set to be eliminated are those who get less than 10%.
Finally, if a number of MPs are still in the election, the ones who come last in each round get eliminated until it leaves only two candidates.
The winning candidate is then chosen by a postal ballot of Conservative Party members.
The date of that vote is usually set by the party authorities at the point when the contest starts.
In 2019, there were 10 candidates at the start of the contest on 10 June.
Mr Johnson became prime minister on 25 July.
Read more:
The highs and lows of prime minister’s time in office
Boris Johnson is going – who are the frontrunners to be the next PM?
Please use Chrome browser for a more accessible video player
Who is prime minister in the meantime?
Hannah White, deputy director of the Institute for Government, says the UK has to have a prime minister.
What usually happens, she says, is that the PM stays on until a new premier is in place.
Mr Johnson has said he will remain as prime minister until his successor is appointed by the leadership election.
During that period, Ms White says that the prime minister has to form a government to run the country.
As a result, if Mr Johnson stays on, he will make Cabinet and ministerial appointments.
Those ministers will remain in place until a new government is formed – most likely after the election of a new leader, or following a new reshuffle, in the event that should that happen in the meantime.
Do ministers who have quit go back to their jobs or will there be new ministers?
It is up to a prime minister who they appoint to Cabinet and other ministerial positions.
Mr Johnson will have to convince MPs to help him form a stable government, but it is unclear whether he will be able to do so.
He could ask those who were in their jobs before they resigned, or new ones.
Whether they choose to take up those positions will be a personal and political decision for those MPs.
Read more:
Johnson appointed new cabinet moments before he resigned as prime minister
The rise and fall of Johnson: the political magician who won power but lost control
What happens if Johnson is unable to find enough ministers to form a government?
The current situation, which follows the highest number of ministerial resignations in one day, is unprecedented.
It remains to be seen whether Mr Johnson, assuming he doesn’t leave Downing Street immediately, will be able to form a government.
If he is unable to, Ms White says he may be forced to leave sooner than he intends, or he will be forced out by his colleagues.
In that event, it is likely the Conservative Party would find a replacement for him to do the job in the interim before the election is completed.
If Johnson can’t form an interim government and refuses to leave his job, what then?
If Mr Johnson is unable to form a government but refuses to resign, or if anyone else is unable to form a government, the role of the Queen is to ask someone to form a government.
But Hannah White said she would be reluctant to do that.
She said: “Somebody has to form a government. It’s just that it’s… extremely undesirable to put the queen in that position, that she should have to do that.”
She is likely to choose someone in discussion with the cabinet, initially choosing someone from the Conservative Party, because they remain the largest party in the Commons, but there have been times in the past when the monarch has asked others who may be able to form a stable government, to take the position of prime minister. When Winston Churchill took over from Neville Chamberlain, Chamberlain is said to have recommended his successor directly to King George VI.
There may be short periods during a handover when authority is less clear cut but, under normal circumstances, these are brief and the Cabinet Office is responsible for making sure decisions can still be made.
Hannah White says the UK government is not like the Northern Ireland Assembly, which went without a working government for more than three years, or like Belgium, which went without a nationally elected administration for more than 540 days during coalition talks.
She told Sky News: “We have to have a prime minister that can command the confidence of the House of Commons, if there’s a bottom line at all in our system.”
If Johnson is forced out before the date he sets, who else could be PM?
It is likely that the interim PM will be someone who is not running in the leadership election – because it could be said they would receive an advantage from being in such a high-profile position.
Dominic Raab is currently deputy prime minister, but if he has intentions to run for the top job, party officials might dissuade or prevent him from being interim premier.
It has been mooted that Theresa May could take up the position as she has experience and has no intention of returning to the position permanently.
Whoever is interim PM will also have to form a government by appointing ministers.
Could there be an election?
If a stable government can be formed, there will not necessarily be an election.
But an election could occur if a stable government cannot be formed.
The Labour Party, or anyone in parliament, could force a vote of no confidence in the government, which would require a new administration to try to form a stable government.
If one cannot be formed, there would be an election.
Is there ever a point at which the country does not have a government?
No, except possibly during very short transition periods.
But what if there still aren’t enough people available to make a full government?
Michael Ellis, minister for the Cabinet Office, sought to reassure the House of Commons on Thursday, that even without a full complement of elected officials, government will continue regardless.
He said: “In the meantime, the business of government continues, supported by our excellent civil service.
“There will continue to be ministers of the Crown in place, including in all great offices of state… the civil service is the foundation on which all governments function… [It] continues to support across all government departments and the country can be assured that this will always remain the case.
“Any transitional arrangements have always been made to allow for the business of government to continue. There are constitutional mechanisms in place to make sure that can happen. Any necessary ministerial vacancies can and will be filled.
“Other Secretaries of State can make decisions if necessary.”