A man who raped a foreign student in the hall of her Carlow home after following her from a bus they had shared has been jailed for ten years.

Ibrahim Ahmed Gharib (39) threatened to kill the woman if she did not keep quiet during the attack.

Gharib had earlier sexually assaulted her during a bus journey from Dublin to Carlow before following her home.

Lawyers for the Egyptian national asked the Central Criminal Court to prevent the media publishing his name because of "threats to his life".

They said Gharib claimed he was concerned that people in his country who are looking for him would find him if he was publicly identified.

Prosecuting senior counsel Pauline Walley said there was a constitutional imperative for justice to be done in public. She said Gharib never raised the issue of threats before and there was no evidence to support the claims.

Ms Justice Isobel Kennedy said that once an accused is convicted of rape, his statutory entitlement to anonymity evaporates and the court has no jurisdiction to continue reporting restrictions.

Gharib, of Dolmen Heights, Pollerton, Co Carlow, denied rape, sexual assault and threatening to kill the woman at her home between 7 and 8 July 2016.

He also denied sexual assault of her on the bus on 7 July.

A jury returned unanimous guilty verdicts after a three-week Central Criminal Court trial last November.

Today, Ms Justice Kennedy said the rape offence merited a 12-year prison sentence.

She reduced that to ten years in consideration of Gharib's lack of relevant previous convictions and the fact that he is a foreign national.

Warning: Readers may find some parts of this report distressing

Garda Sylvia Ryan told the court that the victim was living and working in Ireland for the summer of 2016. On the day in question, she took a bus from Carlow to Dublin to visit a friend.

She met Gharib on the bus and the pair got talking. They then visited Stephen's Green together, where Gharib tried to kiss her. The woman rejected his advances and said goodbye to him shortly afterwards and met her friend at Trinity College.

The victim was returning to Carlow that night and her friend walked her to the bus station. The court heard she was uneasy to discover that Gharib was going to be on the same bus home.

Gda Ryan said the woman got on the bus first and put her rucksack on the seat beside her, but the man sat beside her anyway.

During the bus journey, Gharib sexually assaulted her by groping her, while she tried to fend him off.

The court heard Gharib then accompanied the woman to her home.

"She was extremely unhappy about this," Ms Walley said, adding the woman told him to leave. Instead, Gharib came with her into her house.

He asked to use the bathroom and when he emerged, he started masturbating in front of her, the court heard.

When she threatened to take a photo of him, he became angry and started groping her, before they fell on the stairs and he raped her.

"(He told her) he would give her the best ten minutes of her life," Ms Walley said.

The front door remained open during the attack. The woman screamed throughout and Gharib threatened to kill her if she did not stop.

One of her housemates heard her screaming and came to the landing of the house where he witnessed the rape. Gharib ran out of the house but was arrested at a later date in Dublin.

In a victim impact statement read out in court by Ms Walley, the woman said: "The protective layer around me has broken down and I have very little trust in humans."

She said she was now scared to be on public transport or in public places. Referring to the rape, the woman said: "In that moment, I wished to be dead. After this man raped me, I felt empty, as though nothing mattered."

The court heard the woman did not wish her attacker to be named as she "doesn't want to destroy his life any more", Ms Walley said.

Gharib, who was living with another woman at the time of the rape, maintained throughout the trial that the sex was consensual.

He does not accept the verdicts of the jury and maintains his innocence, the court heard. He has three previous convictions, including two for abusive and threatening behaviour in public.

Colman Cody SC, defending, said his client was a "productive member of society" who arrived in Ireland in 2013 and worked mainly on fishing trawlers.

He has been in custody since his arrest and is a "model prisoner", Mr Cody said. He urged the judge to be as lenient as possible.