This Thursday, the British public will vote for its next government. And since the campaign began, the country has had to reimagine what this race is about. Where once analysts were predicting a comfortable landslide, many now suggest a far closer race with an unpredictable outcome.

Below, WorldViews will answer some of the big questions about the race.

Wait, didn’t Britain just have an election?

Yes. This will in fact be the third year in a row Britain will have a major nationwide vote — fourth if you include the 2014 Scottish independence referendum, where voting only took place in Scotland.

Britain voted for its last government in 2015. This past summer, of course, it held a referendum on leaving the European Union. The shock result of that particular vote led Prime Minister David Cameron to resign; he was in turn replaced by Theresa May after an internal leadership contest in the governing Conservative Party.

So why vote now?

In April, May reneged on earlier promises to not hold an early election and announced that the country would vote for a new government on June 8.

Analysts have pointed to various factors in May’s decision, including the possibility that May could extend the Conservatives majority in parliament as she negotiates Britain’s exit from the E.U. Another likely factor was that Britain’s next election was originally due to be held in 2020 — possibly in the middle of complicated Brexit negotiations — so calling an early election helps simplify the timing.

Under Britain’s Fixed-term Parliaments Act of 2011, elections are supposed to be held every five years, but May was able to call the election earlier after getting the backing of the opposition Labour Party.

How will the actual voting work?

Britain has a parliamentary system with first-past-the-post voting — a contrast both to the presidential system in the U.S. or the proportional representation seen in some European parliaments. This system means that Britons have one vote to choose their local member of parliament. Whichever party has the most seats in parliament will then form a government, with the party’s leader as prime minister.

Unlike proportional representation, the system often inflates majorities — meaning that a party doesn’t have to receive 50 percent of the vote to have a majority in parliament. Historically, this has resulted in Britain having a two-party system dominated by the center-right Conservatives and the center-left Labour Party.

When will people vote and when will results be out?

Voters can go to the polls between 7 a.m. and 10 p.m. local time. Exit polls will be published shortly after that (no exit polls can be published earlier on the day, due to British election laws), with the final result possible as early as 3 a.m. local time.

Who are the main contenders to be prime minister?

Labour Leader Jeremy Corbyn delivers a speech to thousands of gathered crowds at a rally next to the Sage building on June 5 in Gateshead. (Ian Forsyth/Getty Images)

Here are the candidates for the four most popular parties in Britain right now.

Theresa May of the Conservatives. May was a dark horse in last year’s battle to succeed Cameron as prime minister, outmaneuvering bigger names like Boris Johnson. Formerly Britain’s home secretary for six years — a major cabinet position that includes national security responsibilities — May is Britain’s second female prime minister after Margaret Thatcher. She is regarded as savvy by political observers but has sometimes appeared awkward on the campaign trail. May opposed Brexit during the referendum campaign, but has taken a hardline approach to negotiations.

Jeremy Corbyn of the Labour Party. For decades, Corbyn was a relatively obscure figure on Labour’s far left, better known for his speeches at antiwar demonstrations than his hand in policy. But after Labour suffered an unexpected defeat in the 2015 election, the quirks of the party’s internal politics handed him the party leadership. Corbyn has been dubbed unelectable and faced considerable opposition from his own party, but his radical chic and pro-spending policies have won over considerable numbers of younger voters. Corbyn campaigned for Britain to stay in the E.U. ahead of the 2015 referendum. Labour now supports Brexit but favors a less confrontational negotiating style.

Tim Farron of the Liberal Democrats. Farron is the leader of Britain’s long-standing third party, the centrist Liberal Democrats, having taken over from former Deputy Prime Minister Nick Clegg in 2015. However, Farron has struggled to capture the imagination in the way his predecessor did and has faced criticism for refusing to say whether he viewed being gay as a sin. The Liberal Democrats are one of the most pro-E.U. parties in Europe and under Farron they are promising to stop a “hard Brexit” with another referendum that could allow the country to stay in Europe.

Paul Nuttall of UKIP. The United Kingdom Independence Party (UKIP) rose to prominence over recent years with its campaign to leave the E.U. and its divisive leader, Nigel Farage, but it rarely had much in the way of actual electoral success. Now, with Nuttall in charge and Britain headed out of the E.U. anyway, the party looks adrift and is unlikely to score many, if any, seats in parliament. But counting the party out entirely may be premature: UKIP, now styling itself the “guard dog of Brexit,” is still the fourth most popular party in the country according to polling.

So May called the election early. Does that mean she thinks she’s going to win?

When the prime minister called the election, she had good reason to believe she would not only win — but win in a landslide. Corbyn was viewed as an ineffective leader at best. Even politicians from his own party were predicting a “historic and catastrophic defeat,” with some warning that Britain could be heading towards a one-party state.

However, in the weeks since the election was called, Labour’s numbers have rebounded dramatically. Most analysts put this down to May’s awkward appearances on the campaign trail, which stands in contrast to Corbyn’s more relaxed attitude and populist policies. Some polls even suggested that Corbyn could potentially have a shot at becoming prime minister, though Labour is still behind the Conservatives in polls.

How could Corbyn be prime minister without Labour getting enough votes?

A small number of polls, most notably those conducted recently by the company YouGov, have suggested that the Conservatives will not only fail to improve upon their current majority, but that they could actually lose that majority entirely. This would result in what is known as a hung parliament.

Under a hung parliament, parties may be able to team up in order to form a government — hence Labour could form a coalition with the Liberal Democrats and other smaller parties. Such a scenario is unlikely, but it is noteworthy as it would give the Liberal Democrats and potentially other small, pro-E.U. parties like the Scottish National Party sway over a government.

But aren’t British electoral polls always wrong?

In the past few years, British polling companies have failed to accurately predict a number of votes. Most damning was the 2015 general election, where many expected Corbyn’s Labour predecessor Ed Miliband to become prime minister.

The polling companies themselves are more aware of this than anyone and have spent years examining data to see where they went wrong. The general conclusion is that the polls overestimated the turnout of young voters, who generally tend to vote less than older voters and lean more toward Labour and the Liberal Democrats.

Some polling companies are now taking radical changes to their methodologies in a bid to correct for past mistakes. YouGov, for example, is using an unusually large sample size and a complex model (notably, its results are far more favorable to Labour than some of their peers). But whether these changes will work is hard to say right now.

Has terrorism played a role in the election?

There have been three major terrorist attacks in Britain over the past three months, shaking a society that had largely been spared the violence seen in other European nations in recent years.

Generally terrorist attacks are thought to give small boosts to right wing parties. Corbyn may be particularly at risk here, because of previous statements of sympathy toward the Irish Republican Army and accusations of leniency toward Islamist militants. However, May’s past as home secretary also leaves her open to criticism because she oversaw budgets that cut the number of armed police officers in England and Wales.

Is President Trump a factor?

Trump is widely unpopular in Britain — one poll from February found half of the country thought he was “dangerous” — and his comments criticizing London Mayor Sadiq Khan after a terror attack the weekend before the vote have been controversial within the country. While May was quick to embrace Trump — even flying to Washington to be his first official visitor — Corbyn has distanced himself from Trump, just recently condemning the U.S. leader for being “reckless and dangerous” by pulling out of the Paris climate agreement.

What does this all mean for Brexit?

It’s hard to say. The shadow of Brexit looms over pretty much everything in Britain right now. Both major parties support leaving the E.U., though they differ on the details of what a negotiation should look like. Only the trailing third party, the Liberal Democrats, questions that wisdom but it favors a new referendum rather than an outright U-turn.

But the unexpectedly complicated 2017 general election may serve as a reminder that Britain’s path out of the E.U. won’t be easy to predict.