A man who admits writing an 'offensive' tweet over the death of Captain Sir Tom Moore has claimed he should not be prosecuted.
Joseph Kelly, 35, was arrested after the message appeared on social media following the fundraiser's death earlier this year.
He has pled not guilty at Lanark Sheriff Court but his lawyer said prosecutors had made an error bringing Kelly to trial and had breached his human right to freedom of expression.
The court was told Kelly, of Castlemilk, Glasgow, does not dispute posting 'the only good Brit soldier is a deed one, burn auld fella, buuuuurn' on his Twitter account in February.
But Cameron Smith, defending advocate, argued it was not 'grossly offensive' and did not breach communication laws.
He also said prosecutors had failed to follow their own guidance when it comes to deciding what qualifies as being 'grossly offensive'.
Asking for the case to be dismissed, Smith said: "The court will see that the accused stands accused of breaching the Communications Act where it is an offence for an individual to send a message which is grossly offensive.

"The tweet in question stated 'the only good Brit soldier is a deed one, burn auld fella, buuuuurn' and that comment was made in the passing of Captain Sir Tom Moore who the court may well be aware of.
"The minuter does not dispute that he did author that tweet to his Twitter account however, the minuter contends that his fundamental human rights have been breached and that the procurator fiscal and the prosecution itself is in breach of those rights.
"The fundamental question raised is that if highly trained prosecutors require to be instructed on what may or may not be grossly offensive then how is a layman such as Mr Kelly supposed to judge that, or indeed any other individual?
"He had a mere handful of followers and removed his tweet a few moments after posting, he never envisaged the tweet going viral."
Depute fiscal Liam Haggart said: "The words in that tweet must be read as being made for no purpose but to cause offence."
Sheriff Adrian Cottam said he would take time to consider the case and issue a decision in court on December 16.
Kelly, who was not in court, had his bail continued.
Sir Tom, who helped raise more than £32million for the NHS during the first national lockdown, died from coronavirus and pneumonia in February aged 100.
He won the nation's hearts by walking 100 laps of his garden in Bedfordshire last year during the first lockdown, raising money for NHS Charities Together.
The Queen knighted him last July during a special ceremony in the grounds of Windsor Castle.
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here .