Pakistan's government has condemned a U.S. air strike that killed 11 Pakistani soldiers along the Afghan border.

Pakistani security officials say the soldiers were killed Wednesday at a border post in the country's Mohmand tribal region.

Pakistani officials say fighting broke out when Afghan troops crossed the lawless frontier border and tried to occupy the Pakistani paramilitary post. Pakistani military officials say the U.S.-led coalition then launched an aerial attack on the post - calling it an "unprovoked and cowardly" act.

In a statement, Pakistan's Ministry of Foreign Affairs said the U.S. attack undermines Pakistan's cooperation with the U.S.-led coalition in the war against terror.

U.S. military officials say they carried out the attack on Taliban militants in the area, but they say Pakistan had been informed of the impending air strike.

Maulvi Omar, a spokesman for the Pakistani Taliban says militants attacked U.S. and Afghan forces in the area, with eight militants killed in the resulting U.S. airstrike.

Troops from both Pakistan and Afghanistan, as well as U.S.-led and NATO forces based in Afghanistan, have been fighting Taliban militants in the border region.