Ricky Gervais has backed a dog owner who has been convicted of being 'grossly offensive' online after he filmed his girlfriend's pug giving Nazi salutes and put it on YouTube.

The comedian took to Twitter to throw his support behind Mark Meechan from Coatbridge, Lanarkshire, who was found guilty under the Communications Act in Airdrie Sheriff Court on Tuesday.

Meechan, 30, had recorded a pug, Buddha, responding to statements such as 'gas the Jews' and 'Sieg Heil' by raising its paw. He was arrested for allegedly committing a hate crime after he uploaded the footage to YouTube in April of 2016.

Gervais took a strong stance against the verdict, tweeting: 'A man has been convicted in a UK court of making a joke that was deemed ''grossly offensive''.

'If you don't believe in a person's right to say things that you might find ''grossly offensive'', then you don't believe in Freedom of Speech.

'I f***ing hate religion. I've criticised and ridiculed it for 40 years. Yet if my government tried to ban it or criminalise it, I would march alongside those poor fools and fight hard for their right to believe any f***ing stupid nonsense they chose.'

Mark Meechan from Lanarkshire filmed his girlfriend's pug giving Nazi salutes and put it on YouTube in April 2016. The 30-year-old was found guilty of being 'grossly offensive' online on Tuesday. Pictured: Meechan (left) and former EDL leader Tommy Robinson on Tuesday

Gervais took a strong stance against the verdict, tweeting: 'A man has been convicted in a UK court of making a joke that was deemed ''grossly offensive''

Meechan recorded the dog, Buddha, responding to statements such as 'gas the Jews' and 'Sieg Heil' by raising its paw in a Nazi salute (pictured)

Meechan, who was supported by former EDL leader Tommy Robinson, said he was going to appeal the decision as he left court on Tuesday.

He added: 'There has been a miscarriage of justice. I think it is a very dark day in regards to freedom of speech and freedom of expression.'

'The thing that was most worrying is that one of the primary things that has to be considered is things like context and intent and that was completely disregarded.

'For any comedians in Britain, be very, very worried about making jokes in future because the context and intent behind them apparently don't matter any more.'

Robinson, who supported Meechan in court on Tuesday, added: 'This is the intelligence services, this is the government, this is the police cracking down and silencing free speech on people who are not even allowed to tell jokes.

'As we're in Scotland, Frankie Boyle has always said far worse.'

Meechan announced the verdict on Twitter, simply writing: 'Guilty. Recess called to await sentencing.'

The self-proclaimed comic was charged under the Communications Act and the offence is punishable by up to two months in prison.

Although Meechan was due to be sentenced on Tuesday, the judge delayed his sentencing until April 23.

Meechan continued to update his followers through Twitter, writing: 'While awaiting sentencing, Court has ordered that I meet with a court social worker for an assessment as to whether or not a Restriction Of Liberty Order will be placed on me.

'This would involve a GPS tracking device being attached to me and me being placed under house arrest.'

Meechan said it was 'extraordinary bad luck' the video featuring the pug became so popular, amassing more than three million views on YouTube

Police later accused the 30-year-old of spreading 'anti-Semitic' material on YouTube, where he calls himself Count Dankula

The self-proclaimed comic was charged under the Communications Act and the offence is punishable by up to two months in prison. Pictured: The pug featured in Meechan's video

Meechan's stunt provoked outrage after being posted on YouTube where it has more than three million views.

He said he has lost eight jobs since posting the video and claimed he only intended it to be seen by seven of his friends, who follow his YouTube channel, Count Dankula.

But he says the video was shared, by someone, on the social media platform, Reddit, which led to the surge in its popularity, amassing more than three million views.

Meechan said it was 'extraordinary bad luck' the video became so popular.

Meechan, who claims the video was 'for the purposes of comedy', previously said he had received support for the joke from famous Jewish comedian David Baddiel.

But Sheriff O'Carroll said the video, in which the phrase 'gas the Jews' is repeated 23 times, was 'threatening and grossly offensive.'

He found Meechan guilty of sending by 'means of a public electronic communications network a message or other matter that is grossly offensive or of an indecent, obscene or menacing character'.

Giving his verdict to the court, O'Carroll on Tuesday said: 'In my view, there is no doubt it's [the video] grossly offensive.'

He said Meechan knew the video was offensive as he said himself during his evidence that he 'likes offensive comedy.'

Sheriff O'Carroll said: 'He said he chose 'gas the Jews' as it was the most offensive phrase associated with the Nazi's that he could think of.

'It was the centrepiece of the joke. He said it was so extreme that it added to the comedy.'

Meechan, who claims the video was 'for the purposes of comedy', previously said he had received support for the joke from famous Jewish comedian David Baddiel. Pictured: Meechan (left) arriving at court with his partner Suzanne Kelly (right) on Tuesday

Meechan announced the verdict on Twitter, simply writing: 'Guilty. Recess called to await sentencing'

Meechan continued to update his followers through Twitter, writing: 'While awaiting sentencing, Court has ordered that I meet with a court social worker for an assessment as to whether or not a Restriction Of Liberty Order will be placed on me'

Sheriff O'Carroll said Meechan 'knew what he was doing' adding: 'It is self-evident that the material is anti-Semitic.'

He did not believe Meechan's defence that the video was made as a private joke to annoy his girlfriend, as he had 'not taken any steps to prevent the video being shared publicly'.

In closing statements, during the trail at Airdrie Sheriff Court, Meechan's defense agent Ross Brown said: 'The purpose of the video was to annoy his girlfriend.

'There was no evidence to demonstrate that he intended, by communicating the material, to cause fear or alarm.'

He added that Meechan had only intended for the eight subscribers to his YouTube channel - all of which are friends who 'share his sense of humour' - to see the video.

But Mr Brown said: 'One of those friends leaked the material and so the content went viral.

'It was not a matter that was able to be reasonably foreseen.'

Defence agent Mr Brown also said there was no evidence that Meechan had intended to 'stir up hatred on religious grounds.'

He pointed out that in a second video filmed by Meechan after the M8 video, that he had stated he had 'no ill will towards the Jewish community.'

Sheriff O'Carroll said Meechan 'knew what he was doing' adding: 'It is self-evident that the material is anti-Semitic.' He did not believe Meechan's defence that the video was made as a private joke to annoy his girlfriend

He stated the video was to be seen as 'comedic or satirical.'

Mr Brown accused the crown of 'promoting the phrase 'gas the Jews' out of context it was intended'. He added: 'Context is everything.'

Mr Brown said there was no evidence of a complainer in the case, adding Police Scotland was not contacted by anyone who found the video 'grossly offensive or menacing.'

He slammed the authority saying Meechan's arrest was 'an attempt to demonstrate diversity credentials.'

He said: 'The complainer would appear to be Police Scotland.'

Mr Brown said his client had been subjected to 'perp walk' after claiming the media was alerted to Meechan's arrest.

He said: 'On his arrest, the media had been alerted and he was photographed before he even got to the police station, let alone before he got to court.

'This 'perp walk' as it is known in America is something I hope is never repeated here.'

Former English Defence League leader Tommy Robinson attended court today in support of Meechan.

Robinson, real name Stephen Christopher Yaxley-Lennon, said the case was a 'huge free speech issue.'