Of a turnout of 72.2%, (33.6 million people) 51.9% voted to Leave and 48.1% to Remain.
Scotland voted in favour of staying in the EU by 62% to 38%, with all 32 council areas backing Remain.
Northern Ireland voted to Remain 55.7% to 44.3%. Wales voted 51.7% to 48.3% to Leave.
The North East voted to Leave 58% to 42%, as did the North West with 53.7% Leave votes to 46.3% Remain.
The West Midlands also voted to Leave 59.2% to 40.8%. 59.9% of Londoners voted to Remain, with 40.1% balloting to Leave.
Yorkshire & Humber voted to Leave 57.7% to 42.3%, with the East seeing 43.5% Remain against 56.5% to Leave.
Speaking outside No.10 Downing Street on Friday morning, Cameron said he would step down in three months’ time. “I love this country and I feel honoured to have served it,” he said.
Cameron said the result of the referendum meant the country needed “fresh leadership”.
“I fought this campaign in the only way I know how which is to say, directly and passionately, what I think and feel, head, heart and soul. I held nothing back, I was clear about my belief that Britain is stronger, safer and better off inside the EU,” he said.
The UK is the first major country to decide to leave the bloc, which evolved from the ashes of the war as the region's leaders sought to build links and avert future hostility.
Financial authorities around the world have warned that a British exit will reverberate through a delicate global economy.
Suggested For You
SUBSCRIBE AND FOLLOW
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements.Learn more