LONDON – Millions of Britons go to the polls Thursday for one of their country’s most momentous votes of the past half-century: to decide whether the United Kingdom remains a member of the European Union or pulls out.

The outcome of the referendum is too close to call. Opinion polls show the “Remain” and “Leave” sides neck and neck, with a narrow sliver of undecided voters potentially holding the key.

The stakes could hardly be higher, both for Britain and for Europe as a whole. A vote to withdraw from the 28-nation E.U. would end Britain’s membership in the world’s largest trading bloc, which is home to about 500 million people. It would also raise fears among E.U. powerhouses such as France and Germany that other countries might want to follow Britain out of the club.

Supporters of the “Leave” campaign argue that ditching the E.U. would restore Britain’s sovereignty, especially over its borders. Anger over a steady influx into Britain of other E.U. residents, who are allowed to settle in Britain without restriction and who often take jobs that many British workers refuse to do, has fueled much of the movement to quit the European Union.

But the “Remain” camp contends that exiting the E.U. would be tantamount to economic suicide for Britain as a small, if dynamic, country that would then have to try to negotiate favorable trade agreements on its own with far larger nations such as the United States and China. Britain would also lose access to automatic intelligence-sharing and security cooperation within Europe, putting its safety at risk, pro-E.U. advocates say.

Campaigning has gone down to the wire, with a surge in the final weeks toward the “Leave” side in spite of the fact that the leaders of Britain’s two biggest political parties (Conservative and Labor), all of the country’s closest and most important allies – including the U.S. – and most economists, from Nobel Prize winners to the head of the International Monetary Fund, have urged Britons to vote “Remain.”

The debate has been heated and often venomous. The race was further shaken up last week with the shooting and stabbing death of a promising young member of Parliament, Jo Cox, who was a passionate supporter of the “Remain” side. Her alleged killer, a 52-year-old British citizen now being investigated for connections to far-right groups, identified himself in court as “Death to traitors, freedom for Britain.”

In the London-focused entertainment industry, the overwhelming sentiment is in support of staying in the E.U. A number of high-profile celebrities such as Benedict Cumberbatch, Keira Knightley and David Beckham have called on their fellow Brits to vote “Remain,” while a handful of others, including actors John Cleese and Liz Hurley, are in favor of “Brexit.”

The polls opened Thursday at 7 a.m. British time and will close at 10 p.m. More than 46 million voters are eligible to cast a ballot. With the two sides apparently running even, the result may not be known until Friday morning in Britain.

“Go out and vote ‘Remain’ for a bigger, better Britain inside a reformed European Union – stronger, safer, better off,” Prime Minister David Cameron said at a rally Wednesday.

At Cameron’s side, Former Prime Minister John Major warned that those who wanted to lead Britain out of the European Union were “the gravediggers of our prosperity” who would soon “have some very serious questions to answer.”

But former London Mayor Boris Johnson – the “Leave” campaign’s highest-profile advocate and a potential successor to Cameron as prime minister – said he hoped that “everybody who wants to take back control of our democracy will come out and vote….Because if we don’t, we’re just locked in this thing. It’ll go on and on with no reform at all.”