The mixed early picture across Great Britain was apparent in initial counting in Northern Ireland too.
It was clear even before counting began that turnout was higher in unionist areas, than non-unionist areas.
In West Tyrone the turnout of 61.69% was lower than North Down (67.3%) or Strangford (64.1%) when normally the latter would have a far lower turnout.
The first result in Northern Ireland to declare was Foyle, which was 32,064 votes (78.2%) for Remain to 8,905 for Leave (21.8%).
In Belfast, some Remain campaigners drew solace from respectable Remain votes in middle-class unionist areas from early tallies.
But the Belfast DUP councillor Lee Reynolds, from the NI Vote Leave campaign, one of the DUP’s top number crunchers, said: “I think we may surprise people in terms of Northern Ireland.”
After assessing numerous ballot box returns, he told the News Letter: “What the polls showed we gained as the campaign went on is likely to be true.
“I would expect it to be a Remain vote overall in NI but I would expect the level of the Leave vote to surprise people.”
Mr Reynolds added: “We had a good campaign. Unionists turned out to the polls, particularly the working class, and nationalism didn’t.”
Some early indications from the count in Belfast suggested that as many as a quarter of nationalists in the city have voted to leave the EU, a senior source in the Remain camp said.
In what would be a surprisingly big vote for Brexit by Irish nationalism, the source said that in tallies conducted by Remain volunteers during the first hour of the verification process around 75% of votes from nationalist areas were backing Remain.
Tallies from one West Belfast box showed 80% of voters supporting Remain.
A box from Dundonald, in the overwhelmingly unionist suburbs of East Belfast, was almost perfectly divided between both camps. A box from the working class loyalist stronghold of Donegall Pass showed 50% voting for Leave.
A DUP MP has said that the sheer closeness of the result on the EU referendum is likely to inspire anti-EU sentiment across Europe, and could spark similar votes.
Gregory Campbell said he had no indication of how the tally is going from his East Londonderry constituency so far – except that it is a high turnout.
Nigel Farage and Northern Ireland Secretary Theresa Villiers had sounded pessimistic notes as far as the Leave campaign goes.
But Mr Campbell was asked, if Remain wins, whether he could foresee another such referendum in his lifetime.
“I can’t,” he said. “What I can see is not another referendum in the UK – but if there’s a very close vote ... I can see the fires of democracy will burn across Europe. Because people who are Eurosceptics across the continent will see there is hope.”
Earlier, First Minister Arlene Foster expressed hope of a high turnout.
Northern Ireland Secretary Theresa Villiers reportedly said earlier that she believes the UK will remain part of the EU.
Sky News’ official Twitter feed reported her as saying that “her instinct is ‘Remain’ will win & it would be down to ‘Project Fear’ succeeding”.
Sinn Fein Deputy First Minister Martin McGuinness said on Twitter: “Secretary of State Theresa Villiers and Nigel Farage conceding early that #leave campaign has lost. If so I’ll warmly welcome that.”