It was a matter of when, not if, the United Kingdom would be attacked by terrorists again. The when ended up being Friday.

The perpetrator this time was British citizen Usman Khan, 28, who police said stabbed two people to death and injured three others in the London Bridge area. Brave Londoners managed to restrain the assailant, and police shot and killed him.

The Islamic State terrorist group, also known as ISIS, claimed credit for the attack, but no evidence has yet emerged of direct ties between ISIS and Khan.

The dead were identified as Jack Merritt, 25, a course coordinator for an initiative called Learning Together, and Saskia Jones, 23, one of its volunteers. Learning Together enables students from universities and prisons to study and learn together. Khan previously had been cited in the organization’s literature as an example of a successful case study.

Ultimately, there is no one else to blame for this attack except Khan. Still, we should expect further recriminations because this is one of those attacks where the authorities have not done all they may be reasonably expected to do to safeguard the public.

We are used to hearing that those who commit terror attacks in Europe were already on the radar of domestic security services for potential terror offenses. However, Khan was not just on the radar; he had gotten out of jail only last year.

Khan previously was part of a network of terrorists in the U.K., some of whom were jailed for planning attacks on the London Stock Exchange.

Authorities arrested Khan in December 2010 in connection with a plan to travel to Kashmir to establish a training camp that would produce terrorists to carry out attacks in the U.K.

Khan was jailed for an indeterminate length of time. The sentencing judge declared that he should not be freed until he no longer was a threat to the public.

However, this verdict was quashed at the Court of Appeal, where Khan’s indeterminate sentence was replaced by more lenient judges with a fixed one of 16 years.

Under U.K. law at the time, offenders were released halfway through their sentences. Since Khan’s initial arrest was in December 2010, he was eligible for release in December 2018.

Before he was freed, though, the parole board should have been asked to make an assessment of the effect on public safety. For unknown reasons, the board wasn’t asked to do so.

That was a major mistake: Khan clearly still posed a danger.

There will be political fallout: An election will take place Dec. 12 in Britain, and already a back-and-forth has occurred on Twitter over prison sentence guidelines between the Conservative government’s home secretary and the Labour Party’s former shadow home secretary.

Clips are circulating online from 2015 showing Labour’s far-left leader, Jeremy Corbyn, expressing unhappiness over British police being given permission to shoot and kill terrorists.

Still, such is the volatility of British politics that it is difficult to predict the extent to which recent events will influence the election. Easier to predict is that Khan’s attack will not be the last.

Islamist terrorists have been successfully striking within the U.K. for well over a decade now. With ISIS reeling but its ideology thriving, chances are they will be doing so in another 10 years as well.