A teenager has been sentenced to seven years and nine months in detention for the racially aggravated attempted murder of a Syrian refugee.

Sean Gorman, 18, previously pleaded guilty to attacking Shabaz Ali, 25, a refugee. He repeatedly stabbed Ali in the chest and stomach during an argument about noise levels in a privately owned homeless hostel in Edinburgh in May.

Passing sentence at the high court in Edinburgh, the judge, Lord Woolman, told Gorman the attack had caused his victim serious physical and psychological harm.

“He cannot work. He can only take short walks with the aid of a walking stick. He awaits further surgery.”

The incident took place at a ground-floor hostel used by Edinburgh council near the Tollcross area of the city. It is thought Ali intervened in a row involving his female cousin, who was also based at the hostel, and a group of people including Gorman, who was then 17.

Gorman also pleaded guilty to the racially aggravated alarm of a woman, thought to be Ali’s cousin. Ali’s father claimed he could hear his son’s attackers shout: “Why are you still here? Why are you not back in your own country?”

The family came from Kobanî in northern Syria, and had been living in Scotland for five years. At the time of the attack, Ali was working as a barber in the Portobello area of Edinburgh and staying in a hostel as he looked for a new home.

Campaigners with Positive Action in Housing (PAIH), a Glasgow-based charity that launched a fundraising campaign for the family, said at the time of the attack that it had heard numerous reports of refugee families in Midlothian near Edinburgh suffering racist abuse and stone-throwing incidents, as well as instances in other parts of Scotland.

Following the sentencing, DCI Paul Grainger of Police Scotland said: “Gorman used appalling racist language before perpetrating significant violence against the victim, who was left fighting for his life.

“I cannot condemn the circumstances of this case strongly enough. Edinburgh thrives on diversity and Gorman’s actions do not in any way reflect the values of our city.

“Significant support has been shown across the capital for the victim and his family, which is far more representative of the strength of inclusivity across our communities.”

Issuing a statement on behalf of Ali’s father, Sivan, the solicitor Aamer Anwar said: “Shabaz’s father welcomes the significant sentence imposed today by Lord Woolman and the message sent out to violent racists like Sean Gorman.”

Describing Shabaz as “a hardworking, peaceful young man who tried to rebuild his life after Syria”, the statement also repeated allegations that, days before the attack, the victim had told Edinburgh council that he felt unsafe in his temporary accommodation “but his pleas for help were ignored”. The council has insisted it takes the safety of hostel residents “very seriously”.