Conservative leadership candidate Kevin O'Leary says he took down an Internet video of himself firing automatic weapons out of "respect" for the memorial to three of the six victims of the weekend massacre at a Quebec City mosque.

The video depicted O'Leary firing a variety of high-powered weapons — including machine guns and an assault rifle — during a visit to a Miami gun range. It was posted just as the high-profile funeral in Montreal was getting underway.

Public Safety Minister Ralph Goodale described the timing of the video as "obviously crass, insensitive and exceedingly dumb."

Story continues below advertisement

The post went up as several thousand mourners, including Prime Minister Justin Trudeau, paid their respects to shooting victims Abdelkrim Hassane, Khaled Belkacemi and Aboubaker Thabti at a Montreal arena.

There were also prayers at the service for the three other victims — Azzeddine Soufiane, Mamadou Tanou Barry and Ibrahima Barry. Another funeral is scheduled to take place Friday in Quebec City.

The short clip, posted on the video sharing service Vimeo, showed O'Leary blazing away at paper targets with a number of firearms, including what looks like a heavy-calibre sniper rifle.

"Still got my marksman chops from my days as a military cadet at Stanstead College," said the accompanying caption.

Several hours later, O'Leary tweeted, "Out of respect for today's service, I have taken down my last post."

The clip, however, remained visible on Vimeo throughout the afternoon.

O'Leary, a businessman and star of the U.S. reality-TV show "Shark Tank," is widely considered to be the front-runner in the race to lead the federal Conservative party, despite his lack of political experience and faculty with French.

Story continues below advertisement

He bills himself as having the business savvy and negotiation skills to help turn around the economy, create jobs and deal with U.S. President Donald Trump.

O'Leary is scheduled to make his first public appearance alongside his leadership rivals at a debate Saturday night in Halifax.