Prime Minister Stephen Harper says he’s “very comfortable” with Canada’s decision to close its embassy in Iran, especially in light of the violence threatening U.S. diplomatic outposts in the Middle East this week.

“When you can't be certain, as we can no longer be certain, of the security of our diplomatic personnel, this is the measure we have to take,” Harper told Sun TV on the same day Ottawa announced it’s also temporarily closing the Canadian embassy in Cairo, where protests over an anti-Islam film have been targeting Western diplomatic missions.

“We assume our diplomats can conduct the business of the country or their respective countries free from fear of persecution or violence,” Harper said. “They are not signing up for military service.”

He called the attack on the American embassy in Benghazi that killed U.S. Ambassador Chris Stevens “horrific” and “disgusting,” expressing caution about the prospect of democracy in countries like Libya and Egypt.

“Mob rule is not democracy,” Harper said. “Just because there is a popular overthrow of a dictator does not mean the next regime will necessarily be based on democratic norms.”

Since protesters first attacked the U.S. Embassy in Cairo on Tuesday, the angry demonstrations have shown no signs of abating there.

"As a security precaution, and to ensure the protection of Canadian staff, we have closed our Embassy in Cairo for the day," Department of Foreign Affairs spokesperson Rick Roth told CTV News in an an email Thursday.

The Canadian embassy is located in Cairo's Garden City neighbourhood, close to the American mission. An increased police presence managed to keep the mob away from the embassy grounds Thursday, however.

Roth did not provide details of security precautions being taken at the Canadian mission in Cairo, but did say, "We are monitoring events closely and taking appropriate security measures."

The embassy is expected to reopen on Sunday, since the normal Egyptian weekend is on Fridays and Saturdays.

Given the Canadian mission’s proximity to the U.S. embassy in Cairo, “it’s no wonder we closed up shop,” Ferry de Kerckhove, a former Canadian ambassador to Egypt, told CTV’s Power Play Thursday.

De Kerckhove said the recent attacks on U.S. embassies in the Middle East raise “broader issues of security missions abroad.”

“Terrorists will hit wherever there is a target of opportunity,” and that could happen in any part of the world, he said.

However, de Kerckhove was critical of Canada’s decision to sever diplomatic ties with Iran, saying it made more sense to maintain a presence in a country suspected of developing nuclear weapons.

“There is no evidence, at least that I'm aware of, that we are facing a higher risk in Tehran today than even three weeks ago,” he told CTV’s Power Play Thursday.

Iranian diplomats have also been expelled from Ottawa.

Former UN ambassador Paul Heinbecker said he’s worried that Canada may be losing its influence in the region by siding with Israel.

“Our policies are not welcome, are not supported by countries like Libya, like Egypt, like Jordan, like all the others in the region except Israel,” he told Power Play.

Harper, however, told Sun TV that Canadians overwhelmingly support the move to shutter the embassy in Tehran.

Morsi assures foreign diplomats

In Brussels for a visit to the European Union Thursday, Egyptian President Mohammed Morsi harshly criticized the movie believed to have triggered the protests.

"We condemn strongly ... all those who launch such provocations and who stand behind that hatred," Morsi said, adding that he had asked U.S. President Barack Obama "to put an end to such behaviour."

Morsi also offered assurances that foreign diplomats and their staff working in Egypt would be protected.

"The Egyptian state is responsible for protecting embassies and consulates, and the Egyptian people will not engage in these ... unlawful acts."

But de Kerckhove said it will be difficult for Morsi to control the mobs in Egypt.

The wave of angry protests began after a clip of an inflammatory movie that mocks Prophet Muhammad was dubbed into Arabic and posted on YouTube, then subsequently broadcast on Egyptian television.

With a report from CTV’s Ottawa Bureau Chief Robert Fife