A 19-year-old man who pleaded guilty to attempted murder after stabbing a teenager six times in the back has been sentenced to three years in jail.

However, in an unusual move, the judge has delayed the start of the sentence to allow him time to ask the Appeal Court for bail, pending an appeal.

Tadgh Costello, from Richmond Hill Monkstown in Dublin, admitted the attempted murder of Josh Leahy at Johnson's Court in Dublin on the 31 May 2012.

He went on trial but pleaded guilty on the fifth day of his trial, after losing legal argument about the admissibility of his statements to gardaí.

Now, in light of last week's Supreme Court judgment on the admissibility of such statements, he intends to appeal his conviction.

The maximum sentence for the offence is life in prison.

Mr Justice Paul Butler imposed a six year sentence with the final three years suspended.

However, in what was described as "an exceptional" move, he delayed the start of the sentence by three weeks.

The court was told Costello was involved in a brawl between two groups of young people who had earlier attended a nightclub.

Gardaí said he showed no remorse after the incident and admitted in interviews that he had tried to kill Mr Leahy.

Probation reports said he had a moderate risk of re-offending.

The court was told he had anger issues arising from his relationship with his father, who had to be thrown out of the family home by him when he was 13-years-old.

Defence barrister Damien Colgan, asked the judge not to impose a custodial sentence, which he said would have a very negative effect on Costello's efforts to rehabilitate himself.

He said Costello was a child in law at the time of the offence and his life was very different now and he was making efforts to resolve his issues.

He submitted psychological reports and testimonials from neighbours who said he was a young man with a good heart who had lost his way.

In a victim impact statement, Mr Leahy said he still suffered pain from his injuries and had nightmares.

He was reluctant to socialise in the city centre and was nervous near groups of people.

Mr Justice Butler said the attack continued to have a severe effect on the victim and it was proper that the courts be made aware of the effect of the crime.

However, the punishment could not be affected by what subjectively happened to Mr Leahy.

He had taken into account Costello's age at the time of the offence and the fact that he had no previous convictions.

He also took into account his admissions to gardaí and said he was treating this as an early guilty plea.

However, he said it required a custodial sentence and post- release supervision by the probation services.

He imposed a six-year sentence but suspended the final three years and directed he undergo post-release supervision by the Probation Service.

The judge said he would delay the start of the sentence by three weeks.

He said he knew this was "exceptional" and he had done it once before.

He said he understood Costello intended to appeal his conviction and if he could make an arguable case before the Court of Criminal Appeal he could apply for bail to that court.

The judge said that because of this he was prepared to delay the start of the sentence for three weeks

He said he was not making any comment or alluding to what might happen in the appeal court.

Senior Counsel Paul Burns for the prosecution said they were not consenting to the sentence delay and asked that the conditions of his previous bail be adhered to.