A man who was obsessed with Batman's arch-nemesis the Joker has been detained indefinitely in a psychiatric hospital after he stabbed a man 16 times in an unprovoked attack.

Dale Pipe, 21, pleaded guilty to attempted murder after attacking 22-year-old Joshua Henley at Belle Vue Leisure Centre in Consett, Co Durham on 28 January.

Moments after the attack, he said the catchphrase "Why so serious?" - used by Heath Ledger in his portrayal of the infamous villain in Christopher Nolan's 2008 film The Dark Knight. He also introduced himself as The Joker to staff at the centre.

He later posted the same line, along with pictures of himself holding knives and washing blood off his hands, on his Facebook account.

Pipe pleaded guilty to attempted murder as well as three charges of having an offensive weapon at Newcastle Crown Court. Judge James Goss described him as a "very dangerous young man" and ordered him to be sent to Rampton Secure Hospital indefinitely for medical treatment.

The court heard that when Pipe was arrested, he was found with a range of knives, an axe, syringes, steroids, duct tape and a balaclava from his bag, along with a handwritten note saying "I will kill someone".

Pipe said he had been told to kill someone by the Joker voice in his head. Police also added that after he was arrested, he attempted to carve a Joker-style 'smile' into his face.

The court heard how Pipe waited in the changing room at the centre before stabbing Henley from behind. It was only Henley's muscle development that protected his vital organs during the frenzied attack which saved his life.

Terrifying and ferocious attack

Stephen Thornton, defending, told the court: "Since the age of 14, he has been suffering from auditory hallucinations, the most influential of which was The Joker.

"His voice persuaded him to mutilate himself, and he tried to carve the face of the Joker on his own face when he was in custody in Durham prison after this attack.

"I am not trying to underplay this attack as it could have been a national tragedy which was only narrowly avoided."

Upon ordering Pipe's detention, Goss said: "He was unable to resist the urges to act on the voices he was hearing and that is why he offended in the way he did.

"He had accumulated a mass of weapons and watched a collection of films of a violent nature.

"The terrifying and ferocious nature of this attack is vividly described in the victim impact statement.

"There is no doubt the minimum sentence for this terrible offence would be life imprisonment with a minimum of 20 years if he had not had a mental disorder."

Speaking after the sentencing, Henley said: "On January 28 2013 my life changed significantly as a direct result of the actions of Dale Pipe.

"I have had to wait some time for the sentencing hearing and I am relieved that the judge has seen fit to impose a sentence that will ensure Dale Pipe will not be a risk to anyone else in the future."