Markus Meechan
The dog seen raising its paw after Meechan called "Sieg heil" YouTube/Markus Meechan

A man who trained his girlfriend's pet pug to respond to vile statements such as "gas the Jews," repeated the phase 23 times in a video clip he uploaded to YouTube.

Mark Meechan is on trial at Airdrie Sheriff Court accused of committing a hate crime by recording the dog, named Buddha, raising its paw when it heard statements such as "gas the Jews" and "Sieg Heil".

In total, the court heard that the phrase "gas the Jews" was repeated 23 times in the short clip, which had been viewed more than three million times on the video-sharing site.

The 30-year-old was arrested after complaints were made about the content and prosecutors believe that he has commited a hate crime by uploading the video in April 2016.

Meechan, of Lanarkshire, says he is innocent of the crime, insisting the videos were only made to annoy his girlfriend, Suzanne Kelly.

Meechan faces an alternative charge of posting a grossly offensive video to social media that was "anti-Semitic and racist in nature," which the prosecution claim was aggravated by religious prejudice.

Prosecutors said the video could cause fear and alarm, and also stir up anti-Semitic hatred, despite Meechan saying in the clip that he "wasn't racist" and he just wanted to "p*** her off".

Markus Meechan
The video has been seen nearly a million times on YouTube YouTube/Markus Meechan

The depute fiscal said, according to the MailOnline: "The video contains footage of the accused stating 23 times in total the words 'gas the Jews' in a comparatively short period of time.

"He accepts he was involved in editing and producing the footage and managed to distil it down to a short period of time.

"This is not some two-and-a-half-hour production with many shards every half hour, this is a toxic distillation of what he may call 'the best bits' of his video.

"He has made very, very, sure the phrase "gas the Jews" is repeated over and over and over again."

They added: "Any reasonable person would suffer fear or alarm having heard that awful phrase uttered over and over and over again."

During the clip, the dog is filmed perking up when it hears the Nazi phrases and is also captured watching a rally by Hilter held at the 1936 Berlin Olympic Games on a laptop.

The prosecutor continued, according to the Metro stating "this was an odious criminal act that was dressed up to look like a joke" and that the dog was "an attempt to muddy the waters around him making, producing and posting the video".

The defendant said he only intended the video to be seen by a small group of his friends.

The trial continues.