Britain has become a kingdom divided after the prime minister resigned and Scotland pledged a new vote for independence in the fallout to the vote to exit the European Union.

Boris Johnson, the most senior Leave campaigner and the touted most-likely contender to replace David Cameron as prime minister, insisted the United Kingdom would not be less united despite fears rippling through Europe in the wake of the seismic referendum.

The pound plunged to a 30-year low and financial markets around the world were in meltdown at the result of the vote, which Mr Johnson said provided Britain a "glorious opportunity".

"This does not mean that the United Kingdom will be any less united … or any less European," the former London mayor said.

"We cannot turn our backs on Europe, we are part of Europe.

"We now have a glorious opportunity … We can find our voice in the world again (as a) powerful, liberal, humane, extraordinary force for good in the world."

David Cameron announces his resignation. (PA Wire)

Mr Johnson said he was sad to see Mr Cameron resign as prime minister, describing him as "one of the most extraordinary politicians of our age".

Mr Cameron announced his plan to leave office after humiliating defeat by more than 1 million votes in the referendum called by him.

He is expected to remain prime minister until his party's conference in October.

"I do not think it will be right for me to be the captain to steer the country to the next destination," he said.

"The will of the British people is an instruction that must be delivered.

"There can be no doubt about the result."

Leave supporters react to the results. (AAP)

A kingdom divided by Brexit vote

Scottish First Minister Nicola Sturgeon said a second independence referendum was "highly likely" and should take place before Britain leaves the EU.

Scotland voted to stay in the EU by 62 to 38 percent, putting it at odds with the UK as a whole, which voted 52-48 in favour of leaving.

"It is a statement of the obvious that the option of a second independence referendum must be on the table and is on the table," Ms Sturgeon said.

"As things stand, Scotland faces the prospect of being taken out of the EU against her will. I regard that as democratically unacceptable.

"I think an independence referendum is now highly likely." Scots rejected independence from the rest of the UK by 55 to 45 percent in a 2014 referendum.

As dawn broke over Winston Churchill's statue opposite the Houses of Parliament, the UK woke up to the news of the EU referendum. (AAP)

Brexit sends shockwaves through Europe

German Chancellor Angela Merkel warned EU member states against drawing hasty conclusions about Britain's decision to quit the bloc, as that risked further splitting Europe amid fears of a domino effect across the continent.

"We take note of the British people's decision with regret. There is no doubt that this is a blow to Europe and to the European unification process," she said.

"(But) what the consequences of this would be... would depend on whether we — the other 27 member states of the EU — prove to be willing and able to not draw quick and simple conclusions from the referendum in Great Britain, which would only further divide Europe."

Member states should "calmly and prudently analyse and evaluate the situation, before making the right decisions together," said Merkel, who will host talks with French President Francois Hollande , Italian Prime Minister Matteo Renzi and European Council president Donald Tusk in Berlin on Monday.

Do you agree with Britain's decision to leave the EU? Yes 37187 No 53372

Mr Hollande said the Brexit vote was a "grave test for Europe", adding that the bloc "must show solidity and strength in its response to the economic and financial risks".

Mr Renzi echoed calls for reform, saying "Europe is our house" and that "the house needs to be renovated, perhaps freshened up".

French far-right leader Marine Le Pen hailed Britain's decision and called for a similar referendum in France.

"Victory for Freedom! As I have been asking for years, we must now have the same referendum in France and EU countries," the National Front (FN) leader tweeted.

Members of the media gather outside 10 Downing Street, the residence of Britain's Prime Minister David Cameron. (AAP)

If elected next year, Le Pen has declared she would become "Madame Frexit" and call a referendum on France's EU membership within six months.

Spain proposed regaining control over Gibraltar centuries after it was ceded to Britain in 1713 after the overseas territory voted overwhelmingly in favour of remaining in the EU.

The British government rejected the proposed shared sovereignty of the enclave in the south of Spain, despite 95.9 percent voting Remain.

A woman anxiously surveys the market's reaction to the Brexit in Taiwan. (AAP)