Britons voted on Thursday in a knife-edge general election that could put their country's membership of the European Union in question and raise the likelihood of independence for Scotland.

Polls opened at 7:00 am (0600GMT) with voters deciding between Prime Minister David Cameron's centre-right Conservatives and Ed Miliband's centre-left Labour in the closest vote in decades.

While the leaders of both main parties insist they can win a clear majority in the 650-seat House of Commons, they will almost certainly have to work with smaller parties to form a government.

Who will team up with whom is the big question.

"At the moment, I have no idea who will be prime minister a month from now," Peter Kellner, president of polling company YouGov, wrote this week. "No pollster or political soothsayer can guarantee what will happen on Thursday."

The last three polls released on Wednesday showed a dead heat between the two main parties, tied at 34 percent, 35 percent and 31.4 percent.

Days or weeks of haggling

Around 50 million Britons are eligible to vote at polling stations located everywhere from shipping containers to churches and pubs on the mainland and remote islands that will close at 2100 GMT.

Exit polls will be released at 2100 GMT and most results will emerge overnight, although the final tally of seats will not become clear until Friday afternoon.

If, as expected, neither the Conservatives nor Labour win a clear majority, they will start days and possibly weeks of negotiations with smaller parties to try and build a bloc of around 326 seats.

The Scottish National Party (SNP), which wants Scotland to split from Britain, looks set to fare particularly well north of the border and secure strong position in the talks.

While that result would have been inconceivable a year ago, support for Nicola Sturgeon's party has soared since Scotland rejected independence in a referendum last September.

The SNP has said it would support a minority Labour government but not a Conservative one.

The centrist Liberal Democrats, junior partners in Cameron's coalition government set up in 2010, will also have a key role to play in post-election negotiations and are open to working with either of the two main parties.

polling
Ed Miliband, Leader of Britain's Labour Party leaves after casting their votes in the village of Sutton, near Doncaster, in northern England on May 7, 2015, as Britain holds a general election. - AFP PHOTO / OLI SCARFF

While their leader Nick Clegg is seen as closer to the Conservatives, he could struggle to hold his own seat amid expected Liberal Democrat losses across the country.

Nigel Farage's anti-EU UK Independence Party (UKIP) is only expected to win a handful of seats and therefore play a limited role in post-election negotiations.

The new government, whether led by the Conservatives or Labour, would face its first big test when lawmakers vote on its legislative programme after a traditional speech given by Queen Elizabeth II in parliament on May 27.

While a new government usually has to win that vote to survive, the situation could be more flexible this time if numbers are tight.

Global consequences

The election is being watched closely around the world due to the consequences it could have for the standing of Britain, a permanent member of the UN Security Council and nuclear-armed NATO state.

Experts say the US, with whom Britain likes to boast of a "special relationship", is already wary that defence cuts are affecting its ability to contribute to military operations as it did in Iraq and Afghanistan.

"A Little England does not augur well for a US foreign policy which aims specifically to empower like-minded states to share the burden of leadership," Jeremy Shapiro, a fellow at the Brookings Institution foreign affairs think-tank in the US, wrote this week.

Another potential issue for Britain's global status is that Cameron has promised a referendum on whether Britain, the world's fifth biggest economy and Europe's second largest, should leave the EU by 2017 if the Conservatives win.

"This general election will determine what Britain's place will be in the world in a way that no other general election has done previously, but the importance of this is chronically under-discussed," Jeanne Park, deputy director of the Council on Foreign Relations, said earlier.

The consequences of the election will start to become clear on Friday but could take far longer than that to play out in full.