THIS Thursday the UK will vote on whether to remain a member of the EU or leave - a decision that looks as if it will go down to the wire.

With less than 48 hours to go until the polling stations open, here is everything you need to know about polling day and its immediate aftermath.

How do I vote?

There are three ways to vote - in person, by post or by proxy.

People intending to vote in person should make their way to their nearest polling station on Thursday - you should have had a poll card telling you where your nearest polling station is for you to vote.

Those who have applied for a postal vote will cast their votes by post ahead of Thursday, and others will have nominated others to vote on their behalf - known as a proxy vote.

The deadline for this has now passed.

If you have a medical emergency on the day, you will be able to apply for an emergency proxy vote - as long as you do so before the deadline of 5pm.

You can also apply to vote by emergency proxy if your occupation, service or employment means you cannot go to the polling station in person, and you only became aware of that fact after the proxy vote deadline.

When can I vote?

Polling stations open at 7am.

You do not need your polling card to vote - but if you live in Northern Ireland you will need to bring a correct form of photo ID.

At 10pm the polls will close.

If voter turnout is particularly high there may be queues at some polling stations. As long as you are in the queue before the 10pm cut-off you will be able to vote.

What will be on the ballot paper?

Voters will be asked: "Should the United Kingdom remain a member of the European Union or leave the European Union?".

They will then need to choose whether they want to "Remain a member of the European Union" or "Leave the European Union" by placing a cross in the appropriate box.

What happens when everyone has cast their votes?

When the polls close, counting will begin across the UK.

The country has been divided into 382 voting areas, each of which will declare its own result. The overall result for the whole of the UK will be announced only when all 382 areas have declared.

Who will be covering it on television?

BBC, ITV and Sky will be providing live coverage into the night after the polls close.

We will be providing live coverage across all our websites into the night after the polls close, ready to bring you the results.

There will also be two live debates in the two-day run-up.

Tonight (Tuesday) at 8pm, BBC1's EU Referendum: The Great Debate will take place at Wembley Stadium, with David Dimbleby, Emily Maitlis and Mishal Husain presenting. Boris Johnson, Sadiq Khan and other Leave and Remain advocates will be questioned by audience members.

Europe: The Final Debate will air on Channel 4 on the eve of the referendum. Hosted by Jeremy Paxman, the line-up includes Admiral Lord West, Alan Johnson, Alastair Campbell, Alex Salmond, Nigel Farage and Theo Paphitis.

When will we have some idea of the result?

It depends - if one side is heading for a clear majority of votes then this should be evident by around 6am.

However if the results keep both sides neck and neck, it might not be until the final declaration is made that we know what the UK has decided.

Unlike the 2015 general election, there will not be an official exit poll giving an indication of which way the votes are leaning.

This is because there is thought to be too great a margin of error in a contest which is predicted to be very close.

What are the key results to watch out for?

  • 12.30am: Newcastle-upon-Tyne and Sunderland should be among the first to declare. The Leave campaign will hope for a big win in Sunderland. The Remain campaign will be looking for a strong showing in Newcastle, which could reflect its performance in other cities.
  •  1am: Results from areas in northern England including Darlington, Hartlepool and Oldham will give an indication of how strong Leave has performed in traditional Labour territory.
  • 1.30am: The first declarations are due from Scotland (Comhairle Nan Eilean Siar - the Outer Hebrides) and Wales (Merthyr Tydfil).
  • 2am: The results start to pick up pace. The Remain campaign will be hoping for big wins in Wandsworth and Westminster in London, and for signs of a good performance in Scottish areas such as Stirling. Rural areas in England - such as Malvern Hills and North Warwickshire - could lean towards Leave.
  • 2.30am: Castle Point could see one of the biggest percentage votes for Leave. The results from areas such as Crawley, Harlow and Rugby should point to how well either side are doing in English towns.
  • 3am: Peak time for declarations, with a third of all results due within the next 60 minutes. If either side is now far enough ahead in the UK as a whole, it might be possible to predict the winner. Results from Scotland and London should be good for Remain, but there are plenty of areas where Leave could pick up votes, especially in the East of England (such as Boston and King's Lynn & West Norfolk).
  • 4am: Birmingham will report one of the largest results of the night. Northern Ireland is being counted as one voting area and should declare its overall result around now.
  • 5am: With the final results due from London and the likes of Glasgow and Liverpool expected to declare around now, a clear winner may well have emerged. Results from south-west England - such as Torbay and West Devon - could boost Leave's hopes if the result is still close.
  • 6am: If the result is still not clear, declarations from places such as Leeds, Leicester and Nottingham will be decisive.
  •  7am: Arun, Harborough and Waveney are the very last areas due to declare. All eyes will be on them if the overall result is still on a knife's edge.
  • We'll be bringing you reaction, news, the results and much more in a live blog on our website this Thursday from 6am into Friday morning- make sure you check back to keep up to date and have your say.