LONDON — A man wearing a fake explosive device stabbed two people in south London on Sunday before he was shot dead by police officers in what authorities called a terrorist attack.

Police identified the assailant as Sudesh Amman, 20, recently released from prison, where he had been serving a sentence for "Islamist-related terrorism" offenses.

British news media said Amman pleaded guilty in 2018 to charges of possessing terrorist documents and disseminating terrorist publications. The BBC reported that one of the manuals Amman admitted owning was "Bloody Brazilian Knife Fighting Techniques."

Police said that armed officers, part of a proactive counterterrorism surveillance operation, were following Amman on foot when the attack began. The police shot him dead at the scene.

Three people were wounded, police said.

It appeared to be the latest incident here by terrorism suspects using knives or cars to attack bystanders. An apparent explosive strapped to the suspect's body was determined to be a "hoax device."

The fact that Amman was previously imprisoned, then released, then followed by police when he allegedly stabbed his victims is likely to stoke anger here that terrorists are being released without being rehabilitated or de-radicalized.

"A Freed Terrorist Strikes Again," blared the Daily Telegraph in an early Monday edition. "Terror attacker freed from jail and on police watchlist," read a headline in the Guardian.

Lucy D'Orsi, deputy assistant commissioner of the London Metropolitan Police, said the attack was "quickly declared as a terrorist incident, and we believe it to be Islamist-related."

Police said a man in his 40s “was initially considered to be in a life-threatening condition,” but “following his treatment at hospital, this is no longer the case.” A woman in her 50s had injuries not considered to be life-threatening, authorities said. A third was hurt by glass shattered when police fired their weapons.

The incident happened about 2 p.m. local time on the main commercial street in south London’s Streatham neighborhood.

Footage on social media showed several people in plain clothes pointing guns at a person lying on the sidewalk.

Karker Tahir, who works on the street where the attack took place, told Sky News he saw a man running on the sidewalk, followed by “two or three” police officers with guns.

“They kept telling him, ‘Stop,’ ” he said. “And I then saw them shoot him three times.”

Tahir added: “A police officer, after he shot him, went to check on him while he was alive. And then they suddenly found something, I think there was a bomb or something. And they stepped back. And that’s when we ran.”

Officials denounced the attack.

“Terrorists seek to divide us and to destroy our way of life,” London Mayor Sadiq Khan said in a statement. “Here in London we will never let them succeed.”

Prime Minister Boris Johnson on Twitter voiced sympathy for the victims, saying, “My thoughts are with the injured and all those affected.”

The stabbing follows a string of terrorism-related incidents in the capital’s center.

In November, a British-born, al-Qaeda-inspired man named Usman Khan stabbed five people before he was tackled by members of the public and shot dead by police. Two of his victims died.

Khan was free on parole, with an electronic tracking device on his ankle, when he entered a conference focused on the rehabilitation of violent offenders and terrorists. Khan, who wore a fake suicide vest, had previously been convicted of conspiring to bomb London landmarks.

In June 2017, three assailants identified as sympathizers of the Islamic State rammed pedestrians with a van on a major bridge over the River Thames in central London, then sought out victims to stab. They killed eight people and wounded 48 before they were shot to death.

The three also wore fake explosives. Terrorists have worn phony suicide vests to frighten civilians, intimidate police or draw deadly fire.

In March 2017, British citizen Khalid Masood plowed a car into pedestrians on Westminster Bridge over the Thames. Masood jumped from the vehicle and stabbed a police officer to death before being shot dead by officers.