Prime Minister David Cameron is to step down by October after the UK voted to leave the European Union.
In a statement outside Downing Street, he said he would attempt to “steady the ship” over the coming weeks and months but that “fresh leadership” was needed.
The PM had urged the country to vote Remain but was defeated by 52% to 48% despite London, Scotland and Northern Ireland backing staying in.
UKIP leader Nigel Farage hailed it as the UK’s “independence day”.
The pound fell to its lowest level against the dollar since 1985 as the markets reacted to the results.
Flanked by wife Samantha, Mr Cameron said he had informed the Queen of his decision to remain in place for the short term and to then hand over to a new prime minister by the time of the Conservative conference in October.
It would be for the new prime minister to carry out negotiations with the EU and invoke Article 50 of the Lisbon Treaty, which would give the UK two years to negotiate its withdrawal, he said.
“The British people have voted to leave the European Union and their will must be respected,” said Mr Cameron. “The will of the British people is an instruction that must be delivered.”
Pro-Leave Conservatives including Boris Johnson and Michael Gove – who are both likely to be among contenders to be the party’s next leader and therefore PM – had signed a letter to Mr Cameron overnight urging him to stay on whatever the result.
Labour leader Jeremy Corbyn, who called for the UK to remain in the EU but was accused of a lukewarm campaign, said poorer communities were “fed up” with cuts and felt “marginalised by successive governments”.
“Clearly there are some very difficult days ahead,” he said, adding that “there will be job consequences as a result of this decision”.
He said the point he had made during the campaign was that “there were good things” about the EU but also “other things that had not been addressed properly”.
Lib Dem leader Tim Farron said Labour’s leader had been “utterly gutless” in making the case for remaining in.
Former Labour Europe Minister Keith Vaz said the EU should call an emergency summit to deal with the aftermath of the vote, which he described as “catastrophic for our country, for the rest of Europe and for the rest of the world”.
Germany’s foreign minister Frank Walter Steinmeier described the referendum result as as “a sad day for Europe and Great Britain”.
But Leave supporting Tory MP Liam Fox said voters had shown great “courage” by deciding to “change the course of history” for the UK and, he hoped, the rest of Europe.
Scotland’s First Minister Nicola Sturgeon said that the EU vote “makes clear that the people of Scotland see their future as part of the European Union” after all 32 local authority areas returned majorities for Remain.
London has voted to stay in the EU by around 60% to 40%.
However, no other region of England has voted in favour of remaining.
The referendum has underlined the social and cultural gap between London and provincial England.
Remain’s defeat seems to have been primarily the product of the decisions made by voters living north of the M4.
Throughout the Midlands and the North of England the level of support for Remain was well below what was required for it to win at least 50% of the vote across the UK as a whole.
Britain is set to be the first country to leave the EU since its formation – but the Leave vote does not immediately mean Britain ceases to be a member of the 28-nation bloc.
That process could take a minimum of two years, with Leave campaigners suggesting during the referendum campaign that it should not be completed until 2020 – the date of the next scheduled general election.
Once Article 50 has been triggered a country cannot re-join without the consent of all member states.
Mr Cameron previously said he would trigger Article 50 as soon as possible after a Leave vote but Boris Johnson and Michael Gove who led the campaign to get Britain out of the EU have said he should not rush into it.
But they also said they want to make immediate changes before the UK actually leaves the EU, such as curbing the power of EU judges and limiting the free movement of workers, potentially in breach the UK’s treaty obligations.
The government will also have to negotiate its future trading relationship with the EU and fix trade deals with non-EU countries.
In Whitehall and Westminster, there will now begin the massive task of unstitching the UK from more than 40 years of EU law, deciding which directives and regulations to keep, amend or ditch.
The Leave campaign argued during a bitter four-month referendum campaign that the only way Britain could “take back control” of its own affairs would be to leave the EU.
Leave dismissed warnings from economists and international bodies about the economic impact of Brexit as “scaremongering” by a self-serving elite.
Story: By BBC News