A man accused of the murder of a homeless man who was stabbed over 180 times told gardaí that he heard voices telling him to "do it".

Philip Dunbar, 20, of Glenshane Drive, Tallaght, Dublin 24 has pleaded not guilty to the murder of Adam Muldoon at Butler Park in Jobstown Park, Tallaght on 22 or 23 June 2018.

A voluntary statement that Mr Dunbar made to gardaí and signed was read out in the Central Criminal Court today.

He said he was "chilling around the road all day" when he saw "Floater".

"Floater" was the nickname for Adam Muldoon, the 23-year-old with cerebral palsy who died after he was stabbed 183 times in a park in Tallaght in June 2018.

Mr Dunbar, who was 17 at the time, has pleaded not guilty to Mr Muldoon's murder.

He told gardaí that "Floater" followed him and he helped him over a wall and into a field.

"We had a little argument", he said in his statement, when I stabbed him it was just blank. I could just hear voices say "do it, do it".

He also told gardaí that he knew he "did the stabbing, I just can't remember doing it. I just blanked out".

In the statement, he said he would show gardaí where he dumped the knife. He also said he heard voices saying "just cut yourself, harm yourself".

He said he was on drink and drugs at the time and could not have "done it in a sober mind".

The court also heard that Mr Dunbar's grandmother and guardian was with him at the time of the statement and that he repeatedly declined to see a solicitor.

There was a discussion between them and she suggested that he get a solicitor, but he wanted to proceed.

The court also heard that gardaí advised him that even though it was the middle of the night a solicitor was available day and night and if he changed his mind at any stage the process could be stopped.

The court was told that Mr Dunbar signed the statement that was read out today.

The trial continues.