A man who strapped on a fake bomb and stabbed two people on a London street before being shot to death by police Sunday was recently released from prison, where he was serving time for Islamic-related terrorism offences, officials said.

Deputy Assistant Commissioner Lucy D'Orsi said police are "confident" the attacker was released convict 20-year-old Sudesh Amman.

The afternoon incident on the streets of London recalled a November stabbing attack carried out by another man who had served prison time for terrorism offence. Two were killed in that attack.

Prime Minister Boris Johnson said measures will be introduced Monday to bring "fundamental" change to the way people convicted of terrorism offences are handled in prison and afterward.

It seems likely the victims will survive Sunday's attack in the bustling commercial and residential south London neighbourhood of Streatham, where Amman struck outside a major pharmacy.

D'Orsi said a stabbing victim in his 40s thought to be in life-threatening condition has improved. She said the victim is no longer in danger and that a woman who had been hospitalized has been released.

London police are 'confident' the attacker was 20-year-old Sudesh Amman. (Metropolitan Police via AP)

One other female victim is still in the hospital with lesser injuries police believe were caused by flying glass after the attacker was shot dead.

D'Orsi said the incident started at 2 p.m. local time when Amman was already being trailed by police.

"Armed officers, who were part of a proactive counter-terrorism operation and were following the suspect on foot, were in immediate attendance and shot a male suspect dead at the scene," she said.

She said police saw a device strapped to the attacker's body and called in specialist officers who quickly determined the purported explosive device was a hoax.

Graphic warning: Police fatally shoot London stabbings suspect

London police fatally shot a man who stabbed multiple people in what they call a 'terrorism-related' attack. 0:37

"The suspect had been recently released from prison where he had been serving a sentence for Islamist-related terrorism offences," she said.

Officials praised the police action Sunday but questions are likely to be raised about why the officers trailing Amman could not prevent his attack.

Video from the scene appeared to show three undercover police officers in an unmarked car making a quick stop just after the attack.

Police forensic officers work at the scene of the stabbing incident. (Alberto Pezzali/Associated Press)

Bell Ribeiro-Addy, a member of Parliament who represents Streatham, said the attacker had been under surveillance "for some time."

D'Orsi said there was no "continuing danger" to the public, but the area remained cordoned off as the investigation continued. The usually busy area was deserted as the public heeded police requests to stay away.

The drama about 8 kilometres south of central London marked a departure from recent terror attacks in the British capital that took place near landmarks such as London Bridge and the Houses of Parliament.

'I saw that they shot him'

The attack caused chaos and panic on what had been a typical Sunday afternoon.

Karker Tahir said he was at work when he saw police chasing a man down Streatham High Road, the area's main shopping district.

"They kept telling him, 'Stop! Stop!" Tahir said. "But he didn't stop, and then I saw that they shot him three times. It was horrible seeing it. The man was on the floor and it looked like he had something, which police said may be a device. Police came to us and said, `You have to leave the shop because he has a bomb in his bag.'"

Watch: Witnesses recount stabbing incident

Witnesses describe what they saw in Streatham, London, where police shot and killed a man during a 'terrorism-related incident' on Sunday. 0:44

Images shared on social media showed a man lying on the sidewalk outside a pharmacy.

Stephen Roberts, a former deputy commissioner for the Metropolitan Police, said if the stabbings were carried out by a "self-starter" — someone acting alone — it means any city in the country is vulnerable to a similar sort of low-tech attack.

In November, British authorities lowered the national terror threat level to "substantial," meaning an attack is considered likely. That is the third-highest rung in a five-step system used by British authorities and marked the first time since August 2014 that the threat level had been so low.

People smoke cigarettes next to a sign outside a bar in Streatham. The residential and commercial neighbourhood is about 8 kilometres south of central London. (Alberto Pezzali/Associated Press)

It was lowered because of the belief that the threat of British jihadis returning to the country from Syria had been reduced by events there, including the Islamic State group's loss of territory.

It is not clear if the two attacks since then will lead the independent analysts who make recommendation to the government to suggest raising the level

Thank you to all emergency services responding to the incident in Streatham, which the police have now declared as terrorism-related. My thoughts are with the injured and all those affected. —@BorisJohnson

London Mayor Sadiq Khan urged community resolve in the face of another attack.

"Terrorists seek to divide us and to destroy our way of life," he said. "Here in London we will never let them succeed."

Also Sunday, police in Belgium shot a woman who stabbed and wounded passersby in the city of Ghent, but prosecutors said there was no suspicion of terrorism or a link to what happened in London.