Britain voted Thursday in an election that started out as an attempt by Prime Minister Theresa May to increase her party’s majority in Parliament ahead of Brexit negotiations but was upended by terror attacks in Manchester and London during the campaign’s closing days.

Voters are choosing all 650 members of the House of Commons after May called a snap election, three years ahead of schedule, at a time when her party was well ahead in the polls. But the attacks have forced her to defend the government’s record on terrorism, and this week she promised that if she wins she will crack down on extremism — even at the expense of human rights.

Advertisement

Rachel Sheard, who was casting her vote near the site of Saturday’s attack in London, said the election had not gone as expected — and that it certainly wasn’t about Brexit.

“I don’t think that’s in the hearts and minds of Londoners at the minute, (not) nearly as much as security is,” said Sheard, 22. “It was very scary on Saturday.”

Eight people were killed near London Bridge when three men drove a van into pedestrians then stabbed revelers in an area filled with bars and restaurants. Two weeks earlier, a suicide bomber killed 22 people as they were leaving a concert in Manchester, and five people died during a vehicle and knife attack near Parliament on March 22.

The attacks have left Britain on high alert. The official threat level from terrorism stands at “severe,” the second-highest rating, indicating an attack is “highly likely.”

When May called the election seven weeks ago, she was seeking to capitalize on opinion polls showing that her Conservatives had a wide lead over the opposition Labour Party. She became prime minister through a Conservative Party leadership contest when her predecessor, David Cameron, resigned after voters backed leaving the EU. The time seemed right to seek her own mandate from the British people. She argued that increasing the Conservative majority in Parliament would strengthen Britain’s hand in EU exit talks.

But things did not go to plan.

Brexit failed to emerge as a major issue in the campaign, as both the Conservatives and Labour said they would respect voters’ wishes and go through with the divorce.May, who went into the election with a reputation for quiet competence, was criticized for a lackluster campaigning style and for a plan to force elderly people to pay more for their care, a proposal her opponents dubbed the “dementia tax.” As the polls suggested a tightening race, pollsters spoke less often of a landslide and raised the possibility that May’s majority would be eroded.

In her final message to voters, May tried to put the focus back on Brexit.

“I can only build that better country and get the right deal in Brussels with the support of the British people,” she said. “So whoever you have voted for in the past, if that is the future you want then vote Conservative today and we can all go forward together.”

Labour leader Jeremy Corbyn, an old school left-winger widely written off at the start of the campaign, has drawn thousands of people to upbeat rallies and energized young voters with his plans to boost public spending after years of Conservative austerity.

His calls for increased spending on the National Health Service, schools and police, as well as the nationalization of railroads and utilities, have proven popular — but it would take a huge swing in voter support for Labour to unseat the Conservative government.

Corbyn told supporters at his final rally that Labour’s campaign had “changed the debate and given people hope. Hope that it doesn’t have to be like this; that inequality can be tackled; that austerity can be ended; that you can stand up to the elites and the cynics. This is the new center ground.”

While the gap between the two parties has narrowed, virtually all polls suggest the Conservatives will retain control of Parliament. A high turnout is seen as Labour’s best hope of eroding the Conservative majority.

The Conservatives held 330 seats in the last Parliament, compared with 220 for Labour, 54 for the Scottish National Party and nine for the Liberal Democrats.

Security has dominated the late stages of the campaign, after the attacks in Manchester and London. May said this week that she would consider rewriting human rights legislation if it gets in the way of tackling extremism.

Corbyn, meanwhile, accused Conservatives of undermining Britain’s security by cutting the number of police on the streets.

While security was on many voters’ minds, it was far from the only issue.

“It’s important, but it’s only one issue amongst several,” said 68-year-old Mike Peacroft. “I wouldn’t necessarily say it’s at the top. Obviously at my end of the (age) spectrum I’m more interested in things like pensions and so forth, NHS health care — plus schooling, those are really my main concerns.”

It rained intermittently across much of the country on polling day, but experts said it would likely not affect turnout.

“We live in a country where a bit of drizzle is commonplace,” said John Curtice, an election expert at Strathclyde University.

Polls are open from 7 a.m. to 10 p.m. (0600GMT to 2100GMT).___Associated Press writer Kevin Scott in London contributed to this report.