In a statement outside Downing Street, David Cameron said he would attempt to “steady the ship” over the coming weeks and months but that “fresh leadership” was needed.
He had urged Britain 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, PM David Cameron said he had informed Queen Elizabeth II 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, David Cameron said.
“The British people have voted to leave the European Union and their will must be respected,” he said.
“The will of the British people is an instruction that must be delivered.”
The Brexit referendum turnout was 71.8% – with more than 30 million people voting – the highest turnout at a UK-wide vote since 1992.
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 rejoin without the consent of all member states.
The UK’s government will also have to negotiate its future trading relationship with the EU and fix trade deals with non-EU countries.
Sydney has welcomed 2025 with a spectacular fireworks display - cheers erupted as the clock struck midnight…
Following an eight-year legal battle, Angelina Jolie and Brad Pitt have reached a divorce settlement,…
Former President Jimmy Carter died on December 29 at the age of 100 after spending several…
Georgia’s outgoing president Salome Zourabichvili refused to step down on December 29, saying she was…
The bald eagle has been officially declared the national bird of the United States, after…
Dozens of passengers have survived a crash involving a plane carrying 69 people in Kazakhstan,…