A Scottish man arrested for teaching his girlfriend’s dog to do the Nazi salute denied in court that he committed a hate crime.

Mark Meechan, 29, taught the pug, named Buddha, to respond with the Nazi salute when prompted by statements such as “Heil Hitler” and “gas the Jews.”

Meechan posted videos of the dog performing the trick on YouTube.

He appeared in court last week after being arrested in May and charged with committing a hate crime and posting a video that was grossly offensive.

The original video, posted last September on his YouTube channel, Count Dankula, has been viewed more than 2.8 million times. Meechan said on the video that he trained the dog to annoy his girlfriend.

“My girlfriend is always ranting and raving about how cute and adorable her wee dog is, so I thought I would turn him into the least cute thing I could think of, which is a Nazi,” he said.

Meechan later posted a video in which he apologized for the original dog clips, saying it was a joke and that he has no such political leanings.

“I am so sorry to the Jewish community for any offense I have caused them. This was never my intention and I apologize,” he said in that video.

JTA Wire Service