A Scottish solicitor has escaped a possible jail sentence after judges at Edinburgh’s High Court ruled that comments he made following a terror trial at Glasgow’s High Court were not in contempt of court.

If prosecuted, it is believed Aamer Anwar would have been the first solicitor in the UK to be tried for contempt.

Delivering their opinion on Tuesday, Lords Osborne, Kingarth and Wheatley said there had been no contempt of court by Anwar, but they criticised his statements as ‘angry and petulant’. They said he had not shown appropriate professional behaviour.

Speaking to the Gazette after the hearing, Anwar ­criticised the ‘deafening silence’ of the Scottish legal profession. ‘It’s been nine months of hell. Most support has come from down south – you don’t have the likes of Gareth Peirce, Michael Mansfield and Imran Khan up here.’

The case attracted interest from English human rights lawyers concerned that a contempt finding would have a chilling effect on lawyers’ ability to speak on behalf of clients after the conclusion of a case.