A man walked among rush hour crowds brandishing a 10in bread knife before trying to stab a policewoman because mental health bosses failed to do their job, a court has heard.

Michael Johnson - a paranoid schizophrenic - was sprayed in the face with pepper spray and struck with batons and shields before police were able to restrain him in Carshalton last November.

At the sentencing of the 25-year-old at the Old Bailey, the court heard he had been assessed as a risk to others and himself in December 2004.

But consultant psychiatrist Dr David James said those responsible for his care had "decided simply to abandon him" leading to a relapse in his condition.

Judge David Paget QC said: "I echo the sentiments of the doctor and it comes at a time when there's very real concern about mental health patients being released into the community without adequate support.

"This might have ended in tragedy. Mercifully it didn't."

Prosecuting counsel Christopher Foulkes said in the weeks before Johnson attacked the police officer, neighbours witnessed him behaving increasingly bizarrely.

He was seen starting small fires in and around his first floor Thornton Road flat and he also threw a television out of the window and smashed up a glass cabinet, Mr Foulkes said.

On the morning of November 1, neighbours noticed fire and smoke behind the door leading to his flat and Johnson was then seen headbutting the door from the inside.

Brandishing the knife, he squeezed through a hole in the door before going down Wrythe Lane and on to North Street where officers used shields to keep him away from schoolchildren and commuters.

During attempts to restrain him, Johnson lunged at PC Claire Holloway who was spared injury because the blade hit her utility belt.

The court was told Johnson, who was born in Liberia and has a prosthetic leg, was diagnosed with paranoid schizophrenia in 2001.

The Carshalton Mental Health Team were due to review his care in 2005, but he was not seen by doctors and he stopped taking medication for his condition.

After the incident he was detained at Tolworth Hospital and on March 27 he pleaded guilty to criminal damage and affray.

Last Thursday, Judge Paget said he could not complete sentencing because Johnson's supervising doctor had not confirmed a hospital bed was available.

He indicated Johnson would be detained indefinitely however, and went on to praise the actions of his neighbours Glenn Barlow and Beverley Watts.

"Their conduct is in stark contrast to the inexplicable inaction of the Carshalton Community Mental Health Team," he said. "As Dr James points out in his report, as long ago as December 2004, Johnson was diagnosed as constituting a risk to others and to property.

"What Dr James says is whereas the logical action would be to redouble their efforts, they decided simply to abandon him and cross him off their books."

Carshalton Mental Health Team is part of the South West London and St George's NHS Mental Health Trust.

A spokesman for the trust said clients like Mr Johnson are discharged from their care only when they have been stable for some time and are considered able to be managed, by their GP, in the community.