Harper also pledged that Canada will work through its allies to help three of its citizens still in Iranian prisons. Questions surrounding their fate have become a live issue following Canada's abrupt decision to close its Tehran embassy and expel Iranian diplomats from Canada.
An Iranian lawmaker said his government would have a firm response, while a foreign ministry spokesman called the Harper government hostile and racist, and accused it of doing the bidding of Israel and Britain, according to Iran's Mehr news agency.
Harper said Canadian diplomats were recalled because of Iran's "capacity for increasingly bad behaviour."
"So, nothing would surprise me. But that is all the more reason why it's essential that our Canadian personnel no longer be present," Harper told reporters on the final day of the Asia-Pacific Economic Co-operation summit.
"Do I anticipate specific actions? No, not necessarily, but as I say, we should all know by now that this is a regime that does not stop at anything. So that's just the reality of the situation."
The Conservative government announced the Tehran pullout just hours after Harper arrived Friday in Russia's Pacific port city of Vladivostok for the APEC leaders' summit.
The West's continuing standoff with Iran was one of several global security issues to rear its head at the 21-nation meeting, along with the crisis in Syria, and regional tension in the South and East China Seas.
Harper came to APEC to advance his government's pro-Asia trade agenda. And he said the security issues didn't distract his fellow leaders from the economic focus of the summit.
But Harper still talked about global security in his meeting Sunday with Chinese President Hu Jintao. China's proposed take over of an Alberta oil and gas company wasn't mentioned in the 30-minute discussion because it is under review by his government, Harper said.
Canada's surprise embassy closure sent ripples across the globe — it topped the websites of two Iranian news agencies — as the West grapples with trying to curb Iran's nuclear ambitions.
Iran's Fars news agency said the country's parliamentary speaker, Ali Larijani, cancelled a planned visit to Canada to protest the embassy closure.
Tehran's foreign ministry spokesman accused the Harper government of "extremist" views and said it was "unwise" for Canada to have set a five-day deadline for Iranian diplomats to leave the country.
The Iranian foreign ministry also said the embassy closure was "unprofessional, unconventional, and unjustifiable."
The Foreign Affairs Department has warned Canadians against travelling to Iran, singling out dual Canadian-Iranians as especially vulnerable because Tehran does not recognize their new citizenship.
The heated rhetoric has raised questions about the fate of Canadians in Iranian prisons, including two on death row.
"We will continue both from Ottawa, through our partners and allies to continue to advocate on behalf of Canadians who have those kinds of difficult consular situations, legal situations in Iran," Harper said.
Iranian-Canadian blogger Hossen Derakhsan, 35, was sentenced to 19 years in prison for his writings, which inspired other Iranian reform bloggers.
Toronto's Ghassemi-Shall, 43, who emigrated to Canada after Iran's 1979 Islamic revolution, faces a death sentence after being charged with espionage when he returned to visit family four years ago.
His wife, Antonella Mega, said she had been seeking the embassy's help to clarify reports her husband's death sentence has been suspended, and is unsure how effective the government's promise to make appeals through its allies will be.
"I'm not sure how you instill a dialogue when you just cut off the dialogue," she said.
"Canada needs to be present. It can't do it by proxy entirely," Mega added.
Saeed Malekpour, a web programmer from Richmond Hill, Ont. is on death row after being charged with promoting pornographic websites. He says he was tortured into confessing to crimes.
They are awaiting their fate in Tehran's notorious Evin prison, where Zahra Kazemi, a freelance photographer with dual Canadian-Iranian citizenship, was tortured and killed in 2003. Canada later recalled its ambassador, calling Kazemi's killing a state-sanctioned murder.
Until Friday, the Kazemi incident marked a new low in Canadian-Iranian relations since the 1979 Islamic Revolution. The Canadian embassy was closed for eight years after Canadians spirited America diplomats out of Tehran in 1980 during the U.S. hostage crisis.
NDP foreign Affairs critic Paul Dewar has called the latest embassy closure bizarre and irresponsible, saying it has removed Canada as a potential player in the Middle East.
But the Harper government should have pulled its diplomats out of Tehran long ago, said Fen Hampson, head of the global security program at the Waterloo, Ont.-based Centre for International Governance Innovation.
"Iran has consistently shunned and snubbed us and showed flagrant disregard for the basic rights of Canadians since the brutal murder of Zahra Kazemi," Hampson told The Canadian Press Sunday.
"Those who argue we need to maintain consular services ignore the fact our diplomats have been ineffective in defending the interests and rights of Iranian Canadians when they have gone home and run afoul of the regime."
Earlier Sunday, Harper held talks with Hu, and the two leaders presided over the signing of the Canada-China Foreign Investment Promotion and Protection Agreement, which was announced during Harper's visit to China in February.
The agreement is designed to protect Canadian investors doing business in China.
Meeting Hu was considered the centrepiece of the prime minister's trip to the APEC summit because of his government's focus on Asia, which includes boosting trade and investment with the booming continent's largest economy.
Harper wants to narrow Canada's trade deficit with China. Canada's annual exports to China are just shy of $17 billion, but its imports total $48 billion.
China invested a record $11 billion in Canada last year, but Canada's investments in China totalled only $4.6 billion.
"Mr. prime minister, we attach great importance to the China-Canada relationship," Hu told Harper, as the two leaders faced each other opposite a long table, flanked by officials.
"I look forward today to discussing with you a range of issues and finding ways to further strengthen our relationship," Harper replied.
Harper said he raised concerns with Hu about the imbalances of trade between the two countries, as well as concerns about China's human rights record.
But Harper said there was no discussion of Industry Canada's ongoing review of the China National Offshore Oil Co.'s $15.1-billion deal to buy Calgary-based Nexen Inc. (TSX:NXY). China has already invested heavily in Canada's natural resources sector, but the Nexen bid has sparked concern because CNOOC is a state-owned entity.
The Hu meeting was one of four that Harper held over two days with fellow APEC leaders. He also held talks with the leaders of Japan and Peru on Sunday.
Harper met Saturday with his host, Russian President Vladimir Putin. They too pledged to deepen trade and investment links, but they had a spirited disagreement on the West's insistence that Syria's Bashar Assad should be forced to step down.
_With files from Will Campbell in Toronto
Also on HuffPost