A DESPERATE and heavily armed man who roamed the aisles of a superstore was suffering depressive illness at the time, a court was told.

James Glendenning Douglas has been remanded in custody since the incident which led to Tesco Extra, in Durham, being evacuated, on February 8.

But, following a hearing at Durham Crown Court today, Douglas is to be freed next week for assessment to be treated under the guidance of a community psychiatric nurse.

The court was told his actions that night were "the cry for help" of a man who had been homeless since November, with drug debts of £10,000.

He approached a security guard waving a machete near the entrance to the Dragonville store at 1am.

The guard tried to grab Douglas by the wrist, but backed off when he realised he was carrying a snooker cue in the other hand.

Douglas then walked round the general store area, brandishing both weapons, shouting: "Is anyone in Tesco listening to me?".

The guard triggered a panic alarm calling staff and customers to leave the store.

Police arrived to find staff members distressed outside the premises.

An armed response team with a dog handler scoured the store before confronting Douglas on an aisle floor.

He ignored requests to put his hands in the air and so a Taser was deployed by an officer before Douglas was detained.

The machete and cue were seized from him, but he was also carrying a knuckleduster plus a football sock containing two snooker balls.

He told police he owed £10,000 in drug debts and after drinking heavily decided to do something to get arrested.

Douglas, 31, formerly of Sharp Crescent, Gilesgate, Durham, admitted affray and four counts of possessing an offensive weapon at his first court appearance.

Following preparation of a psychiatric report, he was brought back to court for sentence on Friday.

Caroline Goodwin, for Douglas, told the hearing: "This was completely out of character.

"He went to the store with the express aim of being arrested.

"The doctor says in the report that he was suffering severe depressive disorder, effectively having a breakdown.

"This was a man who was desperately crying out for help and has shown great remorse since.

"He’s incredibly chastised over the fear he caused the staff, but he was desperate."

Judge Christopher Prince said he wanted to protect the public to ensure there is no repeat.

The judge asked for an assessment by a psychiatrist and a community psychiatric nurse over a "package" of measures to enable Douglas to be treated in the community.

He ordered that he should be released from custody on Tuesday so he can assist in preparation of the assessment.

Douglas, who was bailed to an address in Rose Street, Trimdon Grange, County Durham, will return to court for sentence next Friday.