British Prime Minister Boris Johnson has promised to end the early release of convicted "terrorists" after an attacker stabbed two people days after he was set free halfway through his prison term.

Sudesh Amman, jailed in 2018 for possession of terrorist documents and disseminating terrorist publications, was shot dead by police on Sunday after he went on the rampage with a stolen 25cm (10-inch) knife on a busy London street.

ISIL claimed responsibility for the assault in a statement released through the Telegram messaging application, saying: "The attacker in the Streatham area in south London yesterday is an [ISIL] fighter, and he carried out the attack in response to a call to target nationals" of countries belonging to the global anti-ISIL coalition.

More:

Amman injured three people in the attack on Streatham's busy high street - a woman in her 50s who was treated and released from hospital; a woman in her 20s who was hurt by flying glass and a man who was feared to be in a serious condition at the time - he is now recovering.

Amman had previously praised the ISIL group, shared an online al-Qaeda magazine and encouraged his girlfriend to behead her parents.

Johnson said the government would announce fundamental changes in dealing with people convicted of terrorism offences, saying he had come "to the end of my patience" with freeing offenders before they had completed their sentences and without any scrutiny.

"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 in a speech.

"We do think it's time to take action to ensure that people - irrespective of the law that we're bringing in - people in the current stream do not qualify automatically for early release."

The government has repeatedly promised tougher rules on "terrorism" since another former convict killed two people and wounded three more before police shot him dead near London Bridge in November.

Johnson said deradicalisation and rehabilitation were hard and the instances of success were few.

Britain has about 220 prisoners with terrorism convictions.

Mark Rowley, Britain's former most senior counter-terrorism police officer who was in post when Amman was arrested, said dozens of other people convicted of terrorism offences were due to be released early under Britain's sentencing guidelines.

Rights groups have warned against creating a two-tiered system, however, in which prisoners are treated - and punished - differently according to their religious beliefs.

"We have an issue about if you have about 200 or so inside, the question is how do you detain them?" Johnson said.

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