The Pakistani government has expressed its "deep sense of rage" to US and NATO officials over the air strike on the army check point near the Afghan border.

Hundreds of demonstrators, burning American flags and effigies of Barack Obama, shouting "Death to NATO" rallied outside the US consulate in the southern city of Karachi. Protests were also held in several other cities across the country.

"America is attacking our borders. The government should immediately break ties with it," said Naseema Baluch, a housewife attending the demonstration.

NATO has described the killings as a "tragic unintended incident" and says an investigation is underway.

A Western official and an Afghan security official who requested anonymity said NATO troops were responding to fire from across the border.

It is possible both explanations are correct: that a retaliatory attack by NATO troops took a tragic, mistaken turn in harsh terrain where identifying friend and foe can be difficult.

Militants often attack from Pakistani soil or flee after combat across a porous border that NATO-led troops, under their United Nations mandate, cannot cross.

Around 40 troops were stationed at the outpost at the time of the attack, military sources say.

The Pakistani military has reserved the right to retaliate against US targets.

Cut ties

Former Pakistani ambassador to Afghanistan, Ayar Wazir, told ABC Radio's AM that the international community should not underestimate the strength of feeling in Pakistan.

"Obviously everybody is angry. How would you like it if somebody attacks the Australian soldiers inside your country?" he said.

Mr Wazir says Pakistan should refuse any further military aid from the United States. He says if the insurgents can live without it, so can the Pakistani military.

"The United States are not extending any help to the Taliban and they have survived for 10 years fighting with America," he said.

"So, there is no question of Pakistan not surviving. I wish the government decides tomorrow to stand on its own two feet and not look to anyone for assistance or help."

Pakistan has already ordered the United States to leave Pakistan's Shamsi military air base within 15 days.

The attack is the latest perceived provocation by the United States, which infuriated Pakistan's powerful military with a unilateral special forces raid that killed Al Qaeda leader Osama bin Laden in May.

The attack highlights the difficulties faced by the US as it tries to secure the border area that is home to some of the world's most dangerous militant groups who have mastered the harsh mountainous landscape.