A 28-year-old man will be sentenced later this month for the attempted murder of a teenager at a popular hiking spot in south Co Dublin two years ago.

The Central Criminal Court heard that Michael Corbett, from Raheny in Dublin, suffers from paranoid schizophrenia and was in the throes of an acute psychotic episode when he attacked the young man and his two friends at the Hellfire Club in Rathfarnham.

The three teenagers intended to camp there on 27 June 2016.

The 17-year-old boy, his 18-year-old girlfriend and their 18-year-old friend were dropped off by the young woman's mother and had just set up their camp when Corbett came over to introduce himself.

He was homeless, off his medication and had built a hut out of sticks in the same area.

The group sat around a campfire for an hour or two.

Warning: Some graphic details

When the 17-year-old went to get more firewood, Corbett went with him, taking a knife that the group had brought with them to cut wood.

He grabbed the boy from behind and sliced him across the throat three times, before stabbing him in the chest and hitting him on the head with a log. The knife broke and the blade was left in his chest.

When his girlfriend and friend attempted to stop the attack, they too were assaulted.

The young people managed to get help from nearby walkers.

Corbett claimed it was he who had been attacked but then ran off into a wooded area. He was arrested when gardaí found him back at the scene later that night.

In an interview with gardaí he claimed he got "a vibe" off  the 17 year old, and he felt the conversation had become dark and "coded."

He also claimed the teenagers were "loop the loops" and were behaving and speaking strangely.

His defence counsel, Michael Bowman, said what Corbett said did not make any sense.

He said the teenagers had not been aggressive in any way and were 100% innocent.

Mr Bowman told the court that his client had been in the Central Mental Hospital from August 2016 until Easter of this year and had been diagnosed with paranoid schizophrenia. He also had a history of substance abuse.

He had been sectioned and treated in September 2015 and his mother had observed his conditioning deteriorating.

He said Corbett was in the throes of an acute psychotic episode when the attacks took place.

He read a letter from his client to the court in which he expressed how sorry he was and asked for a second chance at some stage.

In a separate letter his mother too apologised for the pain and hurt her son had caused the victims and hoped they would be able to move on with their lives.

Mr Bowman asked Mr Justice Michael White to structure a sentence which took into account the degree to which his illness contributed to the offending behaviour.

In their victim impact statements, read to the court, the three young people said they were now wary of strangers and found it difficult to trust new people.

The 17-year-old boy said he had accepted he was going to die during the attack.

His then girlfriend said she had been diagnosed with post traumatic stress disorder. She suffered from night terrors, was completely and utterly paranoid and had lost jobs, relationships and friendships.

She said she used to be a role model and a leader and now felt she was seen as a fragile, broken person and felt like a nobody and worthless.

The other young man said he no longer felt safe in open areas by himself and was constantly thinking that it might happen again.

Mr Justice White said these were three young people engaged in an innocent pastime, confronted by a man in the throes of a very serious mental illness.

He said the 17-year-old almost lost his life and his friends had to witness this and had displayed wonderful courage by coming to his assistance.

He said that Corbett's mother had been stretched to her wits' end and praised the "wonderful courage" of the young people.

He said he would need some time to reflect and would impose sentence on 16 July.