The aunt of a former policeman who lost his job and was given a "harsh sentence" for a crime he committed off duty has urged MSPs to prevent judges from revealing occupations in court.

Nadim Ahmed was convicted of "a domestic crime" and given a heavy sentence which was later reduced on appeal, Holyrood's Public Petitions Committee heard.

His aunt Parveen Haq suggested it should be enough for police officers who turn to crime to lose their jobs without being handed a custodial sentence.

She said she has obtained evidence from Google, newspapers and her own court research which reveals police officers, lawyers and MPs convicted of crimes receive sentences that are "always custodial, mostly custodial".

Former justice secretary Kenny MacAskill suggested prohibiting judges from disclosing occupations would remove the "element of public shaming" inherent in the justice system.

Ms Haq, a senior NHS physiotherapist from Clydebank, said: "My nephew was accused of a domestic crime outwith his police duty, (but) the reason he got a harsh sentence was because of his occupation.

"He lost his occupation, went to the appeal court and basically his sentence was reduced dramatically because he is no longer a police officer."

She added: "Joe Bloggs has lost nothing, but Pc Bloggs has lost his job.

"Is that not enough, instead of then sending them down the route of custodial sentencing as well?

"Because as far as my research has made available to me, any police officer, any lawyer who has so far stood in front of court has never come away with a deferred sentence, community service, or a fine.

"It is always custodial, mostly custodial."

She added: "Google it, and you'll be able to see police officers given custodial sentences no matter what."

SNP MSP John Wilson said: "So you've based your evidence on a Google search?"

Ms Haq said: "No, newspapers (and) I have researched the High Court and the Sheriff Court, so not just Google and newspapers."

Mr MacAskill said: "We don't put people in the stocks but the reason we allow papers in to report courts is that people are entitled to know (a person) has committed an offence."

He added: "I wouldn't necessarily wish them to wear a horse hair wig, but the reason you have a magistrate of the court sitting up there is to be able to say: 'You have committed a crime in your community and I am imposing some retribution collectively.'

"That is why we actually allow local newspapers in, because it disuades people and because sometimes it's not the £150 fine but the fact all your neighbours and friends have seen that you misbehaved."

Ms Haq said: "Do you feel that the newspapers always tell the truth?"

Mr MacAskill said: "Oh, certainly not, but that's a separate issue about how you would keep them out."

The committee agreed to write to the new Scottish Sentencing Council, recently established to promote consistency and transparency in sentencing practice, for guidance and continued the petition.