The terrorist who attacked stabbed two people on a busy London street days after his release from prison had reportedly told a fellow inmate that he wanted to murder an MP.

Sudesh Amman was shot dead by undercover police around a minute after launching an attack on two bystanders in Streatham High Road, south London, on Sunday. A third person was injured by flying glass during the gunfire.

Police said he began stabbing the victims about 60 seconds after entering a shop, where he stole a knife and removed the packaging as he ran from a staff member.

The 20-year-old, who was jailed for possessing and distributing terrorist documents in December 2018, was freed from prison less than a fortnight ago and had been staying at a bail hostel in nearby .

A former prisoner who spent time with Amman in Belmarsh high-security prison told The Times: "The guy was definitely insane and he never hid his intentions, so it's crazy how he even got out of jail."

Streatham attack: Man shot dead by police after stabbings Show all 22 1 /22 Streatham attack: Man shot dead by police after stabbings Streatham attack: Man shot dead by police after stabbings Armed police officers on Streatham High Road. The Metropolitan Police warned people to stay away from the Streatham area boguta37/PA Streatham attack: Man shot dead by police after stabbings The man was shot dead by police after two stabbed in 'Islamist-related' terror attack in London boguta37/PA Streatham attack: Man shot dead by police after stabbings Sudesh Amman, the attacker, has been named as a convicted terror offender who was released from prison days ago Metropolitan Police/PA Streatham attack: Man shot dead by police after stabbings Items left on the pavement at the scene in Streatham High Road Isis supporter Amman was just 18 when he was jailed in December 2018 after police found a stash of bomb-making manuals and other propaganda. Now 20, he had declared his own wish to carry out a terror attack and stockpiled a combat knife, air gun and black flag at his family home in London PA Streatham attack: Man shot dead by police after stabbings He was being monitored by undercover police and being followed as part of a “proactive counterterrorism operation” when he started the rampage in Streatham AP Streatham attack: Man shot dead by police after stabbings Amman was able to stab two people before being shot dead by armed officers outside a busy row of shops Gabriel Video/PA Streatham attack: Man shot dead by police after stabbings A woman reacts as police officers interview people near to the scene Getty Streatham attack: Man shot dead by police after stabbings An armed police officer on Streatham High Road Deputy Assistant Commissioner Lucy D’Orsi said Amman was wearing a fake suicide ves Gully/PA Streatham attack: Man shot dead by police after stabbings Police forensic officers work outside of a Boots store AFP via Getty Streatham attack: Man shot dead by police after stabbings Police officers at the scene Getty Streatham attack: Man shot dead by police after stabbings A police forensic officer works at the scene in Streatham High Road PA Streatham attack: Man shot dead by police after stabbings Items left on the pavement at the scene in Streatham High Road PA Streatham attack: Man shot dead by police after stabbings A police officer on the scene Dave Chawner/SWNS Streatham attack: Man shot dead by police after stabbings Police forensic officers are seen near the site Reuters Streatham attack: Man shot dead by police after stabbings Police officers on the scene outside an Iceland supermarket Andy Bullemor/SWNS Streatham attack: Man shot dead by police after stabbings Police are seen near a site where a man was shot Reuters Streatham attack: Man shot dead by police after stabbings A policeman secures the site of the incident EPA Streatham attack: Man shot dead by police after stabbings A view of the scene Megan Tobeck Streatham attack: Man shot dead by police after stabbings Armed police at the scene in Streatham High Road PA Streatham attack: Man shot dead by police after stabbings A view of the scene Michael Owens Streatham attack: Man shot dead by police after stabbings Police forensic officers at the scene PA Streatham attack: Man shot dead by police after stabbings A Police officer is seen near a site where a man was shot Reuters

The man said Amman wanted to copy the murder of MP Jo Cox and told him "the only way to get these filthy kafirs (non-believers) out of Syria is to take out MPs like that white guy did with the lady in 2016," The Times reported.

The former inmate told the newspaper that Amman "wanted to do something real, something organised like the [IRA] used to do".

Isis supporter Amman, who at the time of his sentencing was 18 and living in Harrow, smirked as he was jailed for three years and four months at the Old Bailey in December 2018.

Amman was jailed after he stockpiled terrorist propaganda, an air pistol and a knife at his home in northwest London.

He also told his girlfriend he wanted to carry out a terror attack and urged her to behead her parents because they were “kuffar” (non-believers).

On Monday, his former partner told ITV News the Streatham attack had left her “shaking, traumatised, horrified”.

She added: “I just want to move on and have a normal life and I felt like I was starting to, but now it feels like I’m reliving it all, reliving the nightmare."

The Metropolitan Police said he was released from prison on January 23 2020.

Meanwhile, analysis by foreign policy think tank, the Henry Jackson Society, suggests that more than 10 terrorists are due to be released from prison in 2020.

On Monday, Justice Secretary Robert Buckland said emergency legislation was needed to make sure terrorists are not released automatically from prison half way through their sentence.

Mr Buckland said offenders will not be considered for release until they have served two-thirds of their sentence and that no terrorists will be released before the end of their full custodial term unless the Parole Board agrees.

The Parole Board would be "strengthened" to deal more effectively with the risks that terrorists pose and steps would be taken to introduce the plans "as soon as possible", he said.

The government will also consider making new legislation to ensure that extremists are more closely monitored on release and will review whether the current maximum sentences for terrorist offences are sufficient.

Legal experts raised concerns about plans to apply the new rules to prisoners who have already been sentenced, with former independent reviewer of terrorism legislation Lord Carlile telling BBC2's Newsnight: "I think it may have gone too far.

"The decision to lengthen the sentences of people who have already been sentenced, and therefore expected to be serving half the sentence the judge imposed upon them, may be in breach of the law.

"It is certainly going to be challenged."

Scotland Yard said armed officers were following Amman on foot as part of a "proactive counter-terrorism surveillance operation" when the incident took place.

The three victims were taken by ambulance to south London hospitals.

One man, in his 40s, is in a serious but stable condition, police said.

A woman in her 50s, a teacher at a nearby school, had non-life threatening injuries and has been discharged from hospital.

Police said a second woman, in her 20s, who suffered minor injuries believed to have been caused by glass following the discharge of a police firearm, has also left hospital.

Investigations continue with officers also searching two addresses in south London and Bishop's Stortford, Hertfordshire.