ISLAMABAD (Reuters) ? Pakistan ratcheted up pressure on NATO on Monday over a cross-border attack that killed 24 Pakistani soldiers at the weekend, threatening to drastically reduce cooperation on peace efforts in Afghanistan.
The incident has hurt Washington's efforts both to ease a crisis in relations with Islamabad and stabilize the region as it tries to wind down the war in Afghanistan.
"This could have serious consequences in the level and extent of our cooperation," military spokesman Major General Athar Abbas told Reuters.
Pakistan has a long history of ties to militant groups in Afghanistan so it is uniquely positioned to help bring about a peace settlement, a top foreign policy and security goal for the Obama administration.
Washington believes Islamabad can play a critical role in efforts to pacify Afghanistan before all NATO combat troops pull out in 2014, so it can't afford to alienate its ally.
Adding a new element to tensions, and a diplomatic boost for Islamabad, Pakistan's ally China said it was "deeply shocked" by the incident and expressed "strong concern for the victims and profound condolences for Pakistan."
"China believes that Pakistan's independence, sovereignty and territorial integrity should be respected and the incident should be thoroughly investigated and be handled properly," Foreign Ministry spokesman Hong Lei said in a statement on the ministry's website.
Pakistan has been trying to move closer to Asian powerhouse China as ties with the United States have suffered.
China and Pakistan call each other "all-weather friends" and their close ties have been underpinned by long-standing wariness of their common neighbor, India, and a desire to hedge against U.S. influence across the region.
On Saturday, NATO helicopters and fighter jets attacked two military outposts in northwest Pakistan, killing the 24 soldiers and wounding 13 others, the army said.
Pakistan's military denied reports that NATO forces in Afghanistan had come under fire before launching the attack. Abbas said the attack lasted two hours despite warnings from Pakistani border posts.
"They were contacted through the local hotline and also there had been contacts through the director-general of military operations. But despite that, this continued," he said.
After a string of deadly incidents in the lawless and confusing border region, NATO and Pakistan set up a hotline that should allow them to communicate in case of confusion over targets, and avoid friendly fire.
NATO described the killings as a "tragic, unintended incident" and said an investigation was underway. A Western official and an Afghan security official who requested anonymity said NATO troops were responding to fire from across the border.
Pakistan's military said the strike was unprovoked and has reserved the right to retaliate.
Both explanations are possibly correct: that a retaliatory attack by NATO troops took a tragic, mistaken turn in harsh terrain where differentiating friend from foe can be difficult.
An Afghan Taliban commander, Mullah Samiullah Rahmani, said the group had not been engaged in any fighting with NATO or Afghan forces in the area when the incident took place.
But he added Taliban fighters control several Afghan villages near the border with Pakistan.
A similar cross-border incident on Sept 30, 2010, which killed two Pakistani service personnel, led to the closure of one of NATO's supply routes through Pakistan for 10 days.
The attack was the latest perceived provocation by the United States, which infuriated and embarrassed Pakistan's powerful military in May with a unilateral special forces raid that killed al Qaeda leader Osama bin Laden.
Last month, U.S. Secretary of State Hillary Clinton visited Islamabad and held a town hall meeting to try and win over Pakistanis, held talks with her counterpart and urged all sides to seek peace in Afghanistan.
She also repeated U.S. calls for Pakistan to crack down on militants, especially those who cross the porous border to attack American forces in Afghanistan.
Any goodwill from that trip probably evaporated after the NATO-led International Security Assistance Force (ISAF) strike, which triggered a fresh wave of anti-U.S. sentiment in Pakistan.
The main Pakistani association that delivers fuel to NATO forces in Afghanistan said it would not resume supplies any time soon in protest against the NATO strike.
In the Mohmand region, where the attack took place, hundreds of protesting tribesmen yelled "Death to America."
About 200 lawyers staged a protest in the city of Peshawar. Some burned an effigy of Obama.
Newspaper editorials were equally strident.
"We have to send a clear and unequivocal message to NATO and America that our patience has run out. If even a single bullet of foreign forces crosses into our border, then two fires will be shot in retaliation," said the mass-circulation Urdu language Jang newspaper.
The NATO strike has shifted attention away from what critics say is Pakistan's failure to go after militants.
Pakistan vowed to back the U.S. global war on militancy launched after al Qaeda's September 11, 2001, attacks on the United States, and won billions of dollars in aid in return.
But the unstable, nuclear-armed country has often been described as an unreliable ally, and the United States has had to resort to controversial drone aircraft strikes against militants on Pakistani territory to pursue its aims.
U.S. frustrations grew so much that Obama ordered the raid that killed bin Laden in Pakistan be kept secret, knowing it could make the United States even more unpopular in Pakistan.
Pakistan shut down NATO supply routes into Afghanistan in retaliation for the weekend shooting incident, the worst of its kind since Islamabad allied itself with Washington in 2001.
Pakistan is the route for nearly half of NATO supplies shipped overland to troops in Afghanistan. Land shipments account for about two thirds of the alliance's cargo.
Pakistani Taliban militants opposed to Pakistan's alliance with the United States often open fire on trucks carrying supplies to NATO forces in Afghanistan.
Thousands of trucks are now stranded near the border and in other areas, sitting ducks for militants.
"We have asked our drivers to go to any safe area and park their trucks on safe roads," said Israr Shinwari, spokesman for Pakistan's largest association of fuel truck owners.
(Additional reporting by Zeeshan Haider and Qasim Nauman in ISLAMABAD, Izaz Mohmand, Jibran Ahmad and Faris Ali in PESHAWAR; Writing by Michael Georgy; Editing by Paul Tait)