Remain led Leave by 52% to 48%. Since there are no exit polls for the referendum, unlike the general election, this is our best gauge of voter sentiment until results start trickling in from local counting areas around 1 a.m. BST.
The final result is expected to come in closer to 7 a.m. BST. You can follow our live EU referendum result coverage here.
While it has been an unpredictable campaign, Remain has seen a late surge in support. According to a SurveyMonkey poll on Wednesday, Remain had a 3-point lead over Leave. It credited the swing to a "change in the makeup of the likely electorate" as people who previously had not been closely following the referendum on Britain's EU membership started to get involved.
A YouGov poll on Wednesday showed a narrow lead for Remain. Remain was ahead of Leave by 51% to 49%, in a poll that asked people who said they didn't know, which camp they were leaning toward.
The poll results follow a historical trend - referendums often see a late move toward keeping the status quo because change is seen as a risk.