Mohammed Abduljabbar, aged 29, a karate enthusiast from Saudi Arabia, broke into student accommodation in the early hours of the morning and assaulted his victim, with whom he had a “history of animosity”, Dublin Circuit Criminal Court heard.

Abduljabbar, with an address in Willow Park Avenue, Glasnevin, Dublin, pleaded guilty to one count of aggravated burglary and two counts of criminal damage to two glass doors at Gateway Student Village in Ballymun on June 25, 2016.

Officials from the Saudi Arabian embassy were in court for the sentence. The embassy had indicated it would pay €2,000 in damages caused to the doors, said James O’Brien, defending.

Judge Pauline Codd said the offence was aggravated by the fact Abduljabbar armed himself with nunchucks before entering the apartment.

However, she took into account his remorse, his immediate admission of guilt, and a Probation Services report which said he had a low risk of reoffending.

She sentenced Abduljabbar to two years in prison, but suspended the final 21 months on a number of conditions, including that the €2,000 in damages is be paid within 28 days.

Garda Conor Garland told Fiona Murphy, prosecuting, he was called to the apartment block early on June 25, where Abduljabbar came running towards him shouting: “I did it.”

Abduljabbar has eight previous convictions, including burglary and criminal damage.

The court heard Abduljabbar has been in custody for this and another matter since June.

As a foreign student, he had to pay €18,000 for the master’s and was “facing the ruination of his education”, the court heard.