LONDON -- The British government plans to announce new rules for the imprisonment of convicted terrorists after an Islamic militant who was recently released from prison stabbed two people in south London, the second such attack in less than three months.

Prime Minister Boris Johnson said the government would release its plans Monday. Following Sunday's attack and a Nov. 29 attack in which two people were killed in central London, the government said it would effectively stop the early release of convicted extremists, double terror sentences and overhaul the conditions under which they are released back into the community.

"This is a liberal country, it is a tolerant country," Johnson said. ""But I think the idea of automatic early release for people who obviously continue to pose a threat to the public has come to the end of its useful life."

He said the difficulty is how to apply new laws retrospectively to the cohort of people who are currently in the system. He added that de-radicalizing people is a "very, very difficult thing to do" and that he was concerned about the way convicted terrorists in prison are handled.

"Do you detain them en bloc, in one group, and try to keep them together because that avoids them, as it were, infecting or passing the virus of their beliefs to others in jails, or do you disperse them and try to stop them reinfecting each other?" he said.

A man police identified as 20-year-old Sudesh Amman strapped on a fake bomb and stabbed two people on a busy London street Sunday before being shot to death by police.

Deputy Assistant Commissioner Lucy D'Orsi said Amman had been convicted of publishing graphic terrorist videos online and had stockpiled instructions on bomb making and knife attacks. Police on Monday continued to search a hostel that Amman had moved into less than two weeks ago and raided another property outside of London.

Officers had been trailing Amman at the time of Sunday's attack, D'Orsi said, but were unable to head off the bloodshed in the commercial and residential south London neighbourhood of Streatham, where Amman struck outside a major pharmacy on a busy shopping afternoon.

The intelligence think-tank SITE reported that the Islamic State group claimed that the south London attack was perpetrated by one of its "fighters."

IS has been responsible for deadly attacks in Europe in the past few years, but also has a track record of claiming attacks as its own, often with no evidence to prove it. In some cases, the attacks turned out to be carried out by perpetrators with no known ties to the extremist group.

The attack in London recalled a November stabbing attack carried out by another man who had served prison time for terrorism offences. Two people were killed in that attack.

Counter-terrorism officials have warned of the threat posed by militants unless the government couples prison sentences with effective de-radicalization programs. More than 70 people convicted of terror offences have been released in Britain after serving time in prison and more than 200 others are currently in prison convicted of terrorist offences.

London's opposition Mayor Sadiq Khan said Sunday's attack was clearly foreseeable in the wake of the London Bridge murders.

"One of the questions I've got for the government is what are we doing about those 70-odd people who have been released from prison?" he asked.

Ian Acheson, who led an independent review of Islamist extremism in the criminal justice system, told the BBC that the risk-management system was "broken."

"We are going to have to accept that we have to be much more skeptical and robust about dealing with the risk of harm," he said. "We may need to accept that there are certain people who are so dangerous they must be kept in prison indefinitely."

The former head of U.K. counterterrorism policing, Mark Rowley, told the BBC there was some logic in giving convicted militants indeterminate prison sentences.

Rowley said unless current law was changed "police and security services are going to have many, many more cases that they are prioritizing."


Associated Press writer Zeina Karam contributed to this story