Britain is voting Thursday on whether to remain in the European Union in one of the most important national referendums in decades. There have been months of intense campaigning between the "remain" camp that wants to stay in the 28-nation bloc and the "leave" camp that thinks Britain would do better on its own. AP explains the purpose and mechanics of the vote.

WHY WAS THE REFERENDUM CALLED?

British Prime Minister David Cameron courted Conservative and anti-EU voters during last year's hard-fought general election by promising to hold a referendum on the U.K.'s membership in the EU. Those campaigning to leave — the euroskeptics — say the EU has evolved into an undemocratic and oppressive entity completely different from the trading bloc that Britain voted to join in 1973. They claim that only a British exit — dubbed Brexit — can restore this proud island nation's sovereignty and effectively limit immigration. Those campaigning to remain argue that the EU ensures peace and prosperity for more than 500 million people from Portugal to Finland. They say the benefits far outweigh the costs.

___

WHAT DO THE COUNTRY'S LEADING POLITICIANS SAY?

Cameron has backed staying in the EU and risked much of his political capital on that outcome. He is opposed by prominent members of his own party, including former London Mayor Boris Johnson and Justice Secretary Michael Gove, and the outspoken leader of the U.K. Independence Party, Nigel Farage. The leaders of the main opposition Labour Party and the popular Scottish National Party want to stay in the EU.

___

WHAT DOES THE DECISION MEAN TO THE REST OF THE EU?

Some leaders of European countries fear that if Britain leaves the bloc others may try to follow as there has been a rise of anti-EU sentiment in some countries. They also worry about the bloc losing a major member that has played a major security role.

___

WHO CAN VOTE?

British and Irish citizens 18 and over who reside in the United Kingdom, as well as U.K. residents from Commonwealth countries can vote in the referendum. U.K. nationals who live outside the country but were registered to vote in parliamentary elections in the past 15 years, and Irish citizens overseas who were born or registered to vote in Northern Ireland in the same period, can also vote. In addition, some citizens of Gibraltar — a British enclave on the south coast of Spain — and members of the House of Lords, who cannot normally vote in general elections, have been given permission to participate in the referendum. The Electoral Commission says a record number of 46,499,537 voters were registered for the referendum.

___

WHAT'S ON THE BALLOT PAPER?

Voters are asked to answer one question: "Should the United Kingdom remain a member of the European Union or leave the European Union?"

___

WHAT IS HAPPENING THURSDAY?

Polling stations opened at 7 a.m. (0600 GMT; 2 a.m. EDT) and close at 10 p.m. (2100 GMT, 5 p.m. EDT). Many votes will have been cast in advance by postal ballot. Election officials in 382 areas will begin counting the votes immediately after polls close. Strong rains and some flooding have caused problems in parts of London and southeast England that may make it difficult for some voters to get to the polls.

___

IS THERE CAMPAIGNING THURSDAY?

The law doesn't prohibit campaigning on voting day, but by convention political parties refrain from doing so. Publishing exit polls prior to the end of voting at 10 p.m. (2100 GMT; 5 p.m. EDT) is a criminal offense.

___

WHEN AND HOW WILL THE RESULT BE ANNOUNCED?

Regional counting offices will send their results to Manchester, where the chair of the U.K. Electoral Commission is expected to announce the official outcome at about 7 a.m. (0600 GMT; 2 a.m. EDT) Friday. However, the result may well be known as early as 4 a.m. (0300 GMT; 11 p.m. EDT Thursday) as media tally the local results.

___

WOULD THERE BE A RECOUNT IF THE VOTE IS CLOSE?

The rules don't allow for a national recount, but courts can order recounts at the local level. The overall outcome can be challenged by judicial review filed within six weeks.

___

IS THE REFERENDUM BINDING?

No. Parliament isn't legally required to abide by the vote, but there would be strong political pressure to do so, especially if the result of the referendum is clear-cut.