Boris Johnson will become the next prime minister after winning the Tory leadership contest, but the end of that race marks the beginning of many challenges to come.
Here is a look at the daunting in-tray facing Mr Johnson when he enters Number 10 on Wednesday.
Finding a way to succeed where Theresa May failed, by getting a Brexit deal through Parliament, will be the most immediate political challenge.
Unless a snap general election is called to elect a new House of Commons, the incoming leader will face the same parliamentary difficulties that scuppered Mrs May’s attempts to build a coalition behind her proposals.
Alternatively, a new premier could pursue a no-deal policy and allow the UK to leave on October 31 without a formal agreement – although MPs may take steps to prevent that happening.
Either way, the new prime minister will have to find a way to reunite a Tory party which has splintered over the issue and counter the threat posed by Nigel Farage’s Brexit Party, which has sucked support away from the Conservatives.
Brexit has reignited the Scottish National Party’s push for independence.
Scotland voted to remain in the European Union and First Minister Nicola Sturgeon has said she wants another referendum on independence by 2021 if the country faces being taken out of the bloc.
In Northern Ireland, which also voted to remain in the EU in 2016, Sinn Fein has repeatedly called for a border poll to be conducted on whether there should be reunification with the Republic of Ireland.
Under the terms of the 1998 Good Friday peace agreement, the UK Government is obliged to call a vote on the constitutional issue if there is evidence of a change in public opinion in Northern Ireland in favour of Irish reunification.
Fears of a descent into an all-out conflict between Iran and the West reached new heights when a British-flagged tanker was seized by Tehran.
The seizure of the Stena Impero by Iranian Revolutionary Guards in the Strait of Hormuz was condemned by Foreign Secretary Jeremy Hunt as an “act of state piracy”.
With Downing Street being accused of having “dropped the ball”, the Government was to attempt to assembling a European-led maritime mission to protect ships through the key route.
Tehran was suspected of retaliating over the detention of the Iranian supertanker Grace 1, held in Gibraltar after being detained in an operation involving British Royal Marines.
The UK is at odds with its US allies over the Iran nuclear deal, but shares some of Washington’s concerns about Tehran’s wider activities in the Middle East.
With Mr Trump ramping up the US military presence in the area, the new prime minister could be forced to confront major decisions about war and peace early in their tenure.
However, Mr Johnson backed diplomatic efforts and ruled out backing the US in any conflict against Iran when making his leadership pitch.
Maintaining a grip on power
The door to Number 10 may be opening for Mr Johnson, but there are real questions about how long he can keep the keys.
He will command a working majority of just two after Dover MP Charlie Elphicke had the Conservative whip suspended when he was charged with sexually assaulting two women.
And that wafer-thin majority is with the backing of the DUP.
This may further slip to just one if the Tories lose the Brecon and Radnorshire by-election on August 1.
There they are fielding Chris Davies, who was ousted from the seat by a recall petition triggered after he was convicted of submitting false expenses claims.
To add to the pressure, the so-called Gaukeward squad of Tory heavyweights are eyeing a rebellion against any attempt to depart the EU without a deal.
Their namesake, Justice Secretary David Gauke, has given notice that he will resign rather than serve under Mr Johnson, as has Chancellor Philip Hammond.
Sir Alan Duncan quit as Foreign Office minister on Monday and education minister Anne Milton resigned less than an hour before Mr Johnson’s victory was announced.
And any attempt he makes to force through a no-deal Brexit against the desires of MPs could face a legal challenge, with Tory former PM John Major threatening such a move.
A post-Brexit trade deal is one of the key prizes sought by the UK after leaving the EU, but negotiations are likely to run into difficulties over agricultural standards – with political rows over chlorine-washed chicken and hormone-treated beef – and Mr Trump’s “America first” approach to international affairs.
Managing the special relationship will be especially challenging for the next PM following a fraught few weeks of diplomatic drama which led to the resignation of the UK’s ambassador to the US, Sir Kim Darroch.
Unless Mrs May makes an appointment in her final hours, Mr Johnson will soon have to make the key decision on who should be Britain’s representative in Washington.
The tensions caused by China’s rise as an economic and political powerhouse are felt across the West, with the row over whether to allow Huawei to contribute to the UK’s 5G network a symptom of wider unease.
Mr Trump’s US has adopted a tough public approach to China – banning Huawei and slapping tariffs on steel and other imports – while the UK has sought to build a “golden era” of relations with Beijing.
Culture Secretary Jeremy Wright said as recently as Monday that the Government is “not yet in a position” to form a decision, saying clarity is being sought on the implications of US actions against the firm.
Pressure on the new PM from Washington, a final decision on Huawei and disputes over Beijing’s territorial claims in the South China Sea could lead to a rocky period for the UK-China relationship.
The issue which, more than any other, derailed Mrs May’s 2017 general election campaign, her successor will have to come up with a system to cope with the rising costs of the UK’s ageing population.
A Green Paper setting out proposals on how to fund the system has been repeatedly delayed and the issue is politically toxic, with any suggestion of paying for care out of a person’s estate after they die liable to be condemned as a “death tax” by critics, while hiking income tax or national insurance could also be unpopular.
Successive governments have failed to get to grips with the nation’s housing shortage and the issue is likely to feature heavily in the Tory leadership contest.
The Government has a goal of building 300,000 new homes a year by the mid-2020s.