Announcing his resignation outside Downing Street, Cameron said a new leader should be in place by October.
His successor faces an uphill struggle to heal divisions in both the country and the ruling Conservative party and could face pressure to call a new general election, even though it is just a year since Cameron won the last one.
There were already signs that pro-EU Scotland could move to hold a fresh independence referendum, as well as fears that stability in Northern Ireland could also be threatened by the move.
Its leader, veteran socialist Jeremy Corbyn, had campaigned reluctantly to keep Britain in the EU and he is now facing criticism from some in his party after many traditional Labour areas backed Brexit.
Also Read
Anand Menon, director of the UK In A Changing Europe academic research group, added: "Nationalist politicians, be they in Scotland, Northern Ireland or England, will be making hay."
John Mann, a pro-Brexit Labour MP, said he was "out of touch" with traditional working-class Labour voters who were "sick to death" with his policies.
There were also reports of a leadership challenge brewing against Corbyn.
Scotland's ruling Scottish National Party has long indicated that a Brexit vote could provide momentum for a second referendum after independence was rejected in a previous vote in 2014.
First Minister Nicola Sturgeon said early Friday that Scotland sees its future as "part of the EU", fuelling speculation.