In Northern Ireland, First Minister Arlene Foster said that as a leader of unionism, she felt it was the right decision.

"We are now entering a new era of an even stronger United Kingdom," she said.

"We campaigned to leave the EU. This is the democratic decision of the people of the UK. This is a UK-wide decision and every vote is equal within the UK. I am proud of the fact that this decision was taken by the people."

The first minister said she would be working for "the best possible exit negotiation".

Media playback is unsupported on your device

Media captionNI First Minister Arlene Foster says a poll on future of the Irish border "will not happen"

Mrs Foster said a border poll on the reunification of Ireland, as called for by Sinn Féin, would not happen.

"The secretary of state has already indicated that the test for a border poll has not been met." she said.

In speaking about the future, she added: "People should not panic. This is something that will take place over a long period of time. I see it as an historic opportunity to build up this nation state again."

Media playback is unsupported on your device

Media captionDeputy First Minister Martin McGuinness says the case for a border poll has 'strengthened'

However Deputy First Minister Martin McGuinness said the entire island of Ireland should now be able to vote on reunification.

He said there was "a democratic imperative" for a border poll. Mr Cameron had been "sleepwalking towards an exit" over the last year, he said.

He accused him of "kow-towing" to the right-wing agenda and the "little Englander mentality". But, he said, the people of Northern Ireland, both nationalist and unionist, had voted against that.

The deputy first minister said the impact in Northern Ireland would be "very profound".

"Dragging us out of Europe will be to the detriment of all our citizens and will be bad for business, trade, investment, and wider society," he said.

"I, and all Sinn Féin ministers will work to ensure the political institutions remain on a stable footing, but it is very difficult to put detailed contingencies in place until we know the extent of the impact of Brexit on our finances, our infrastructure and health services.

Image copyrightPacemaker

"All of that is still subject to a negotiation but the fact is that we are in unchartered waters.

"Sinn Féin will be seeking an urgent meeting with the Irish government, the European institutions and also with our counterparts in Scotland to discuss how we move forward in the best interests of all of our people."

The Irish Taoiseach (Prime Minister) Enda Kenny said the Dáil (Irish Parliament) is to be recalled on Monday to discuss the impact of Brexit on Ireland.

Image copyrightRTEImage caption
Enda Kenny said the Dáil (Irish Parliament) is to be recalled on Monday to discuss the referendum result

"I am very sorry that the result of the referendum is for the UK to leave the European Union. However, the British people have spoken and we fully respect their decision," said Mr Kenny.

"I want to assure the Irish public that we have prepared to the greatest extent possible for this eventuality.

Vincent Kearney, BBC News NI Home Affairs Correspondent

Those who experienced the "hard border" that existed between Northern Ireland and the Republic of Ireland during the Troubles will shudder at the memory of long queues of traffic as ID was checked and vehicles searched.

On a bad day, the security checks could add a good hour to a round trip between Belfast and Dublin.

"There will be no immediate change to the free flow of people, goods and services between our islands."

He also said the Dáil would publish a summary of the key actions it will take to address the issues arising from the decision of the British electorate.

Overall, 440,437 people in Northern Ireland voted to Remain in the EU and 349,442 to Leave. Out of 18 constituencies, 11 voted to stay in the European Union.

The turnout in Northern Ireland was 62.7% with 789,879 people voting in the referendum.

Stephen Walker, BBC News NI Political Correspondent

The EU referendum debate divided the parties in Northern Ireland and the result to leave means there are conflicting thoughts on what should happen next.

The DUP backed a Leave vote and the idea of holding a referendum was a long-term ambition of the party's Westminster leader Nigel Dodds. First Minister Arlene Foster will be delighted with the result.

The Remain camp included Sinn Féin, the UUP, the SDLP and the Alliance Party and they will highlight the fact that a majority of voters in Northern Ireland bucked the trend, rejecting the arguments for a Brexit.

Sinn Féin have called again for a border poll. The party believes the result means there is now a democratic deficit because the rest of the UK is at odds over the issue of Europe

For Secretary of State, Theresa Villiers, there will be much personal satisfaction with the result. She was a key member of the Leave campaign and although she finds herself in tune with public opinion in the rest of the UK, she will be conscious that her stance is at odds with the majority of people in Northern Ireland.

Speaking after the result was announced, Edwin Poots, DUP, said he was "absolutely delighted".

Media playback is unsupported on your device

Media captionDUP MLA Edwin Poots said the result is 'good news for democracy'

"I believe that we will recover very quickly after the initial shock. The farming community has been in the doldrums... I would expect this will help them. I would expect it will help our manufacturers and our exporters at this time."

In Northern Ireland, Foyle, West Tyrone, Belfast North, Belfast South, Belfast West, East Londonderry, Fermanagh and South Tyrone, Newry and Armagh, Mid-Ulster, North Down and South Down voted in favour of Remain.

Image caption
A cheer for the cameras: the Northern Ireland Leave campaign celebrates

Lagan Valley, North Antrim, East Antrim, South Antrim, Strangford, Belfast East and Upper Bann voted to Leave.

Shane Harrison, BBC NI Dublin correspondent

It is clear this is not the outcome the Republic of Ireland wanted.

The Irish government, which remained neutral in the Scottish independence referendum, actively encouraged Irish citizens in the UK to vote to remain in the EU.