Thursday is polling day in the UK's EU referendum. Here's what to watch out for as the results night unfolds.
What happens when polls close?
Once voting ends at 22:00 BST, sealed ballot boxes are collected and transported to the count venue for each of the 382 local counting areas.
These represent all 380 local government areas in England, Scotland and Wales, plus one each for Northern Ireland and Gibraltar.
Individual areas' results will then be declared throughout the night, along with results from 11 national and regional centres.
Although the results are declared by local authority area, a referendum is different to a general election in that every individual vote across the UK counts equally towards the final result.
According to the Electoral Commission's estimated timings [downloadable file], Sunderland and the London borough of Wandsworth are expected to be among the first counts to be completed, at about 00:30 BST.
Local counting areas vary from Birmingham (nearly 700,000 eligible voters) to the Isles of Scilly (about 1,700) so the amount of time spent counting will vary widely.
So when will we know the result?
It's hard to be certain how things will pan out, as this is only the third UK-wide referendum and there are notable differences with the previous two. Most commentators think a clear picture could emerge between 4am and 5am. That depends on how close the poll is, but the result is almost certainly set to become clear before the final national result is officially declared by the chief counting officer, who will be based at Manchester Town Hall.
The Electoral Commission estimates a final result "around breakfast time" on Friday.
Here's what to watch out for
Once polls have closed, pundits will be freed from their shackles to assess, analyse and predict as they wish. Broadcasters have not commissioned any exit polls for this vote, unlike at a general election. So we won't get a picture of how people have voted until...
Midnight and beyond
The first results start rolling in. Sunderland City Council has a proud record of swift declarations in general elections - will it repeat the trick tonight? According to an Open Europe analysis, based on the British Election Survey, the city is anticipated to lean towards Leave - so if Remain fares well there, it could be in for a good night overall. Conversely, another anticipated earlier declarer, Wandsworth, is predicted to be solid Remain territory, so the opposite applies.
An early result is also expected in Gibraltar, predicted to be firmly in the Remain camp.
Keep an eye on the turnout as the first results are declared - a record number of people are eligible to vote, according to provisional Electoral Commission figures.
At this point, it's time for another coffee, because most of the results are not expected until...
The small hours
At a general election, we can look out for the traditional "bellwether" seats, the outcome of which is often a good pointer towards the overall winner.
It's not so simple this evening. Most pundits agree both sides will have their strongholds - Remain are expected to fare well in parts of London, Edinburgh and university towns like Oxford and Cambridge. Open Europe suggests Eastern England will lean strongly towards voting Leave. We should get an idea of the national picture based on how strongly these predictions hold up.
According to this analysis by Professors John Curtice and Stephen Fisher, these are the councils where the result could be tight:
- High Peak, Derbyshire (estimated 02:30 declaration time)
- Isle of Anglesey (02:30)
- Woking (02:30)
- Worcester (03:00-04:00)
- Portsmouth (03:30)
- Rhondda Cyon Taff (03:30)
- Harrogate (04:00)
- Vale of Glamorgan (04:00)
- Slough (05:00)
They add, however, that there are 58 council areas where the two sides are, according to their estimates, within four points of each other.
"There are in truth no key bellwethers, but rather a large swathe of the country that is likely to tell us the story of the night," they say.
How will Labour voters vote?
Much has been said about Labour supporters - the party leadership backed Remain but there were fears in the Stronger In camp that its core voters could be leaning towards Leave.
This prompted a big late push to persuade Labour supporters to back Remain. Will it work? Keep an eye on the scores from Labour's northern heartlands to find out.
Can't wait until tomorrow? Here are the possibilities for how things will pan out once dawn breaks.
Follow the action on the BBC
BBC One, the BBC News Channel and BBC Parliament will broadcast a results show hosted by David Dimbleby alongside BBC experts and special guests from 21:55 BST.
Jeremy Vine will provide a visual and virtual guide as the results are announced, Emily Maitlis will be speaking to representatives from across the political spectrum and other BBC presenters will be reporting live as results are announced around the country.
Psephologist Prof John Curtice has helped the BBC develop a new predictive graphic that will help analyse the early trends as the results come in.
Throughout the night, the programme will join Nick Robinson as he journeys across the UK, starting in Edinburgh and ending in London, as he speaks to politicians and voters to discuss what the referendum decision could mean.
Coverage continues through the night and Sophie Raworth and Andrew Neil pick up the coverage on Friday morning.
The results programme will be streamed internationally on the BBC News website from 22:00 BST.
BBC Radio 5 live will have coverage as the results come in, as will Radio 4 from 22:00 BST until the Today programme picks up at 06:00 BST on Friday.
From 22:00 GMT, television viewers outside the UK can tune in via BBC World News and BBC World News America. Listeners outside the UK can tune into BBC World Service radio for regular updates.