UK Prime Minister Boris Johnson vowed on Saturday to review Britain’s sentencing system after a convicted terrorist released early from prison stabbed two people to death and wounded three in a London Bridge attack.

Members of the public were hailed as heroes for preventing even greater loss of life by tackling Usman Khan – one armed with a five-foot (1.5m) narwhal tusk and another with a fire extinguisher – before police shot him dead.

Video footage of the confrontation showed Khan, 28, being challenged by a man, reportedly a Polish chef, wielding the tusk – believed to have been grabbed from the historic hall where the stabbings began – as another person sprayed him with the extinguisher.

Khan had been conditionally released from jail last December after serving less than half of a 16-year prison sentence for terrorism and was wearing a fake explosive device.

On Saturday, the so-called Islamic State (IS) group released a statement claiming responsibility for the attack.

“The person who carried out the London attack . . . was a fighter from the Islamic State, and did so in response to calls to target citizens of coalition countries,” IS said, referring to a multi-country alliance against the group.

The incident comes two years after Islamist extremists in a van ploughed into pedestrians on London Bridge before attacking people at random with knives in nearby Borough Market.

On that occasion, eight people were killed and 48 wounded before the three attackers, who were wearing fake suicide devices, were shot dead by police.

Metropolitan Police Assistant Commissioner Neil Basu said five people had been stabbed inside Fishmonger’s Hall by London Bridge before members of the public pursued the attacker. The three survivors remain in hospital.

Basu added that Khan had been released under “an extensive list of licence conditions” with which he had previously been complying.

Police on Saturday searched two properties in Stoke-on-Trent, Khan’s home city, and Stafford in central England.

The latest attack came less than two weeks before Britain’s general election and thrust the issue of terrorism into the heart of the campaign.

Johnson pledged to introduce minimum 14-year sentences for serious terrorist offences, while some convicted might never be released, and to scrap early release if he wins a majority.

“It’s absolutely clear that we can’t carry on with the failed approaches of the past,” said Johnson, who became the leader of the Conservative Party – which has been in power since 2010 – in July.

He also spoke to US President Donald Trump Saturday, who “expressed his condolences” over the attack, according to the White House.

But Labour leader Jeremy Corbyn appeared to raise doubts about the Tories’ handling of the parole and wider justice system in light of the attack.

“We need to investigate fully the way all aspects of the criminal justice system operate,” he said, branding the London Bridge incident “a complete disaster”.

The first victim of the attack was named as Jack Merritt, a course coordinator at Cambridge University’s criminology institute, according to media reports.

‘Best of human spirit’

The institute hosted a prisoner rehabilitation event at Fishmonger’s Hall, a historic building on the north side of the bridge. Khan attended the event reportedly armed with two knives and the fake suicide vest.

As the confrontation moved from inside the hall to the pavement outside, a throng of people could be seen in videos grappling with Khan.

They reportedly included a convicted killer on day-release from prison and other ex-offenders also attending the criminology gathering.

A British Transport Police officer in a suit and tie who also intervened was seen carrying a large knife away.

“As we saw the worst of humankind, we saw the very best of human spirit and London,” Metropolitan Police Commissioner Cressida Dick said on Saturday as she visited London Bridge.

Khan, a British national, was handed an indeterminate sentence for the protection of the public in 2012, with at least eight years in prison.

He was part of an eight-man network inspired by Al-Qaeda who had plotted to bomb targets including the London Stock Exchange and planned to take part in “terrorist training” in Pakistan.

But his sentence was quashed by the Court of Appeal in April 2013 and he received a new 21-year term, comprising a custodial sentence of 16 years and five years on conditional release.

Inmates are usually released halfway through this type of determinate sentence – and time spent in custody before trial may have been taken into account.

The Parole Board said it had no involvement in his release and that it appeared to have happened automatically as required by law.

Johnson said the cases of other convicted terrorists released early were under urgent review.

The Ministry of Justice is reportedly reviewing the licence conditions of every convicted terrorist released from prison, which is understood to be around 70 people.