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.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…