US President Barack Obama has said the US relationship with both Britain and the European Union would endure in the wake of British voters' decision to leave the EU.

"The people of the United Kingdom have spoken, and we respect their decision," Mr Obama said in a statement.

"The United Kingdom and the European Union will remain indispensable partners of the United States even as they begin negotiating their ongoing relationship," Mr Obama added.

Mr Obama spoke by phone today with Mr Cameron where he expressed his regret at Mr Cameron’s decision to step aside.

He noted that Mr Cameron has been a trusted partner and friend, whose counsel and shared dedication to democratic values are highly valued. 

Mr Obama and Mr Cameron agreed that they are confident that the UK and the EU will negotiate a productive way forward to ensure financial stability and continued trade and investment.     

Britain's decision at a referendum on Thursday forced the resignation of Prime Minister David Cameron and dealt the biggest blow to the European project of greater unity since World War II. 

Mr Obama, during a visit to London in April, had argued passionately against Brexit in an unusually strong intervention into British politics.

He had warned that close NATO ally Britain would be "in the back of the queue" for a trade deal with the United States if it dropped out of the EU, but opinion did not swing in favour of the "Remain" campaign.

Thursday's vote result rattled Wall Street and other markets around the world.

US Vice President Joe Biden has moved to reassure Ireland and the EU that its relationship with the US would not change despite the decision of the UK to leave the EU.

Mr Biden said both he and Mr Obama had hoped for a different outcome but said he respected the decision of the British people.

Speaking in Dublin, Mr Biden said he presumed many people in Ireland were also hoping for a different result.

He said the US had "a longstanding friendship" with the UK and he wanted to assure the British people that that "very special bond" would "endure".

He also said the US's relationship with Ireland and the European Union would remain "the cornerstone of its global engagement".

Mr Biden made the remarks at Trinity College Dublin where he received an honorary law doctorate from Chancellor Mary Robinson, his first such degree from a university outside the US.

He also received a gold medal from the Philosophical Society, the oldest student debating society in the world.

Republican Presidential hopeful Donald Trump said it is a "great thing" that the people of the UK have "taken back their country" in voting to leave the EU.

He was speaking shortly after he arrived at at the Turnberry resort in South Ayrshire in Scotland to officially open the revamped resort he bought in 2014.

Mr Trump said: "I think it's a great thing that's happened. It's an amazing vote, very historic.

"People are angry all over the world. They're angry over borders, they're angry over people coming into the country and taking over and nobody even knows who they are.

"They're angry about many, many things in the UK, the US and many other places.

"This will not be the last."

He said UK divisions "will heal" as "it is a great place" adding: "I said this was going to happen and I think it is a great thing.

"Basically, they took back their country. That's a great thing.

"I think we're doing very well in the United States also, and it is essentially the same thing that is happening in the United States."

Former Secretary of State Hillary Clinton, the presumptive Democratic presidential candidate, had also said she hoped the UK would stay in the EU.

In response to Britain's decision to leave, Ms Clinton said the United States must first safeguard against any economic fallout at home at "this time of uncertainty" and underscore its commitment to both Britain and Europe.