The Prime Minister's Office has removed two videos from its own website after realizing the images posed a security risk to Canadian troops in Iraq and Kuwait. 

The videos were shot in Iraq and Kuwait by 24 Seven, the prime minister's in-house media team, which specializes in producing flattering features about Stephen Harper and his government.

Media representatives travelling with the prime minister had questioned whether his staff broke the rules laid out by the military during the PM's visit last weekend.

"The safety of our troops is our number 1 priority. For this reason, there are protocols in place before images or videos are posted," said Harper's director of communications in a statement.

Stephen Harper Iraq trip

A Kurdish soldier sits in the background as Prime Minister Stephen Harper and Minister of Defence Jason Kenney visit Iraq on May 2. (Sean Kilpatrick/Canadian Press)

"When concerns were raised about a few specific images, these were taken down immediately so we could review that the protocols were applied properly," Rob Nicol wrote. "After a second review, it became apparent that two of the videos should not have been posted."

"We regret the error and are reviewing protocols for such images," the statement concluded.

One video is an interview with Defence Minister Jason Kenney shot after Harper's speech to Canadian military personnel based in Kuwait. The second is of Harper's trip to the front lines in Northern Iraq.

Forces not at risk, military says

Despite the security risk, Canadian Forces commanders in Iraq have told the government the safety and security of the troops has not been compromised by the videos, Paul Calandra, parliamentary secretary to the prime minister, said in an interview with Evan Solomon on CBC News Network's Power & Politics

"To the best of my knowledge, at this point these people are still in theatre, their safety and security have not been compromised," Calandra said.

"If that changes, I'm sure the commanders on the ground will remove them from theatre but it's not a decision we make, it's a decision the commanders on the ground will make," he said.

Chief of the Defence Staff Gen. Tom Lawson confirmed that no soldiers are in danger as a result of the breach of protocol, saying in a statement late Tuesday that the risk posed by the videos is assessed as low.

"There is certainly no requirement for any CAF personnel to be withdrawn from Op IMPACT," Lawson added. 

Opposition politicians react

Speaking to reporters in Quebec City Tuesday, NDP Leader Tom Mulcair said the videos were another example of Harper using the war against ISIS for partisan political purposes.

"He put in place strict rules to make sure we couldn't identify our troops over there and he's the first one to break those rules, even if it means putting their lives in danger," Mulcair said. "We find that extremely regrettable."

Under fire from opposition critics, Kenney's parliamentary secretary, James Bezan, read lines similar to Nicol's statement during Tuesday's question period.

"Is it blatant self-promotion, or is it incompetence?" Liberal defence critic Marc Garneau asked.

Warned to not show faces

CBC News saved a copy of the videos before they were removed and is using one of them with this story, but it has blurred the faces of military personnel.

In the Kenney interview, Canadian air crew can be clearly seen in the background.

In the video of Harper, Canadian special operations soldiers are visible around the prime minister — despite the fact that media representatives were given strict warnings not to photograph the faces of any military personnel.

The Canadian military required journalists to sign an agreement to that effect upon their arrival in Kuwait. Journalists were repeatedly warned if they showed the faces of military members, they could expose those members or their families to retaliation by the militant group ISIS, the jihadist group Islamic State in Iraq and Syria.

When officials from the PMO were asked earlier why Harper's own media team appeared to be ignoring those rules, the videos were quickly pulled from the prime minister's website.

A government spokesperson originally said the military approved the images shot by 24 Seven before they were posted. When concerns were raised about the videos, they were removed "out of an abundance of caution," reporters were told.

The spokesperson added that the intention was to put them back online. It now appears that will not happen.

Cloaked in secrecy

Harper's visit to Iraq and Kuwait was cloaked in secrecy. Media were not allowed to reveal the prime minister was even going to Iraq until well after he landed. Journalists on the trip were warned not to include details of any upcoming events in their reporting or any information that might reveal the prime minister's exact location.

Harper's events in Iraq and Kuwait were carefully orchestrated. In Kuwait, he spoke to military personnel in front of a huge Canadian flag and two CF-18 fighter jets.

In Erbil, in Northern Iraq, he was given a closely guarded tour of a Kurdish Peshmerga position about seven kilometres from the front line with ISIS.

Each of the events was captured on camera by 24 Seven and posted online in short packages that resemble legitimate television news stories but are, in fact, partisan campaign-style promotional videos.

With files from CBC News