LONDON — A deadly terror attack struck at the heart of the British capital just weeks before a crucial national election, refocusing the campaign on security issues as voters were set to head to the polls.

That was 2017.

Now, two years later, London Bridge was again the scene of tragedy and bravery this weekend, and the center of national debate in the U.K.

Friday afternoon's stabbing attack left two people dead at the hands of a man released from prison last year after a previous terrorism conviction. Political leaders vowed to briefly pause campaigning, but by late Saturday it was clear that security would — at least temporarily — become the focus of the election.

Prime Minister Boris Johnson vowed to take a tougher stance on crime and security if re-elected. Writing in an op-ed article in the Mail on Sunday newspaper, Johnson called for the reversal of a law that allows serious offenders to be released from prison early and sought to blame the opposition Labour Party for the policy.

Labour leader Jeremy Corbyn criticized the government, which has been in power since 2010.

"There's got to be a very full investigation," he said, though he declined to join Johnson's sweeping call for longer prison terms.

We will change the law so terrorists serve every single day of their sentence.



Who do you trust to keep you safe? pic.twitter.com/OA3BKgYqbR — Conservatives (@Conservatives) December 1, 2019

The snap Dec. 12 vote was called in an effort to end the country's yearslong political deadlock over its divorce from the European Union.

The issue has dominated much of the campaign to this point, with Johnson's ruling Conservative Party appealing to voters to hand them a majority in Parliament they claim would allow them to "get Brexit done."

Labour has sought to focus on health care, claiming Johnson's hardline Brexit plans and vow to strike a free-trade deal with the United States will do damage to the cherished National Health Service.

"Inevitably, an attack like this is going to dictate the agenda for at least a few days," said Tim Bale, a professor of politics at Queen Mary University of London.

"I’m not sure it will permanently knock Brexit, or indeed the NHS, off the headlines, but it's clear both Boris Johnson and to some extent Jeremy Corbyn are determined to not only comment on but potentially capitalize on what’s happened."

Corbyn, a veteran left-wing campaigner, has trailed in the polls throughout but looked to be narrowing the gap in the past week. PAUL ELLIS / AFP - Getty Images

Johnson's law-and-order stance was more likely to appeal to the British public, Bale said, which is "notoriously hardline and much more inclined to a lock them up and throw away the key philosophy."

A public opinion poll by market research firm YouGov for the Sunday Times newspaper found the public split in their confidence in Johnson on security issues, but overwhelmingly lacking confidence in Corbyn's leadership on the subject.

The Conservatives have long sought to paint their opponents as soft on crime, a tactic Johnson returned to in the wake of the London Bridge attack.

Johnson and his allies have attempted to blame a Labour Party policy from 2008 for the early release of Usman Khan, the 28-year-old named as the suspect police shot dead on London Bridge.

Khan was originally sentenced to 16 years in prison in 2012 for his part in an al-Qaeda-inspired plot to blow up the London Stock Exchange and other major sites including the U.S. Embassy.

But Bale said such a reduction of a complex case was "deeply cynical," while some U.K. legal experts pushed back against the claims.

The prime minister repeatedly defended his efforts Sunday to point the finger.

"Although it is very early I think it is legitimate," he told the BBC's flagship Sunday talk show in a combative interview with host Andrew Marr.

One of the families affected by Friday's attack appeared to have made an appeal not to exploit the incident to impose tougher laws.

One of the victims was identified Sunday as Jack Merritt, 25, who was part of Cambridge University's Learning Together program aimed at educating people in prison alongside university students.

Ahead of the attack Khan had been attending a Learning Together event at a historic building adjacent to the bridge, police said.

In a now-deleted tweet, Jack's father, David Merritt, was reported to have said Saturday his son "would not wish his death to be used as the pretext for more draconian sentences or for detaining people unnecessarily."

That wish seemed to have fallen on deaf ears.

Yet it remained unclear whether the strategy would pay off when voters head to the polls in two weeks.

The 2017 attack on London Bridge and Borough Market also came in the buildup to an election.

On that occasion Corbyn was able to gain public favor by criticizing policing cuts that had been imposed as part of the Conservative government's austerity program.

"I think the public did have some sympathy with the idea that you can’t protect people on the cheap and the point he made about police funding back then arguably applies now," Bale said.

While the laws involved in the case may require review, Bale warned that politicians should tread carefully as they quickly apportioned blame.

"Voters aren’t fools and if they begin to think that politicians are trying to make the most out of a tragic incident then it may backfire," he said, "because voters at the moment are very, very cynical about politicians on all sides."