A 25-year-old man, who has pleaded guilty to the repeated rape of a young Spanish student in Dublin last year, wrote an apology in blood on the wall of a prison cell, the Central Criminal Court has heard.

Eoin Berkeley, who was originally from Finglas but is of no fixed abode, admitted three counts of raping the young woman at the Irish Glass Bottle Company site on Pigeon House Road over 21 hours between 15 July and 16 July 2017.

He falsely imprisoned the woman, who was 18 and on her first trip to Ireland, gave her tablets and threatened to kill her, the court heard.

She was described as a naive, trusting young woman who came from a small town and had come to Ireland to stay with a host family and learn English.

She had been in the country just two weeks when the attack happened.

Berkeley, who has 25 previous convictions, was in care from the age of 17 months and was described as having a long history of very adverse life experiences.

In the weeks before the attack, the court heard he had been arrested and detained under the Mental Health Act on the direction of a garda inspector.

His own brother rang gardaí asking for him to be sectioned.

Warning: Some readers may find the following report distressing

The court heard the girl met Berkeley in the city centre and went with him when he said he would show her the beach.

He took her to some tents in the derelict glass bottle site in Ringsend where she remained for 21 hours.

She was tied up with a dog lead and repeatedly raped. He tried to strangle her several times.

He told her he had already killed six people and she would be the seventh.

The woman described how she knew she would only have one chance to escape and had to ensure she took the right one. She eventually escaped and rang her father in Spain.

She did not know where she was and told him she had been raped and the guy was going to kill her. The court heard how her father shouted at her to keep running as she tried to find a path out of the area.

She eventually called at a house, where a Spanish au pair helped her.

In a victim impact statement, she said she thought she was going to be killed and still woke up scared.

She said she could now not trust people and could not be in a relationship.

She was not living the life she should, she said. She wanted to close this chapter as she had a life to lead.

Her father and mother also wrote letters to the court. They described their unbearable anxiety when their daughter went missing.

Her mother said her gratefulness when she heard her daughter had been found was shattered when she heard what had been done to her. They both spoke about their guilt at having encouraged her to go to Ireland to study.

The court heard Berkeley was arrested at the scene in Ringsend the following day.

He was identified from CCTV footage and his DNA matched profiles taken from the Spanish woman's body.

While Berkeley was in a holding cell at the Criminal Courts of Justice he had written a message on the cell wall in blood. Part of the message said: "I'm so sorry".

His defence counsel, Michael Bowman, said Berkeley had significant psychological and psychiatric difficulties, beginning from a young age. He had a significant substance abuse issue.

He had been in care from 17 months old, and had been in full time foster care since he was four years old and was in Ballydowd, which is a unit for troubled young people in his teens.

His mother also had psychiatric difficulties, the court heard. He had described himself as a loose cannon and was a very difficult and challenging individual.

Mr Bowman asked Mr Justice Michael White to impose a just, humane and proportionate sentence, leaving open the possibility of him being able to make some kind of contribution to society in the future.

He said Berkeley was conscious of the enormous harm he had caused to the woman and her family and although his words of apology would be of little comfort, they were there.

Mr Justice Michael White said the victim and her family had provided articulate evidence of the effects of the crime.

He said she had been through a horrific ordeal, her life was in danger, and she had been falsely imprisoned and violated in a horrendous way on three separate occasions.

He said there was a collective sense of shame when someone visiting this country suffered in such a vile way.

He said he had to deal with the issues that had arisen and Berkeley's early guilty plea in this case.

He said he would sentence Berkeley next week on 1 November, after reflecting on all the information put before him.