Soldiers from the Afghanistan National Army and US Army soldiers from the 3rd platoon Delta company conduct a joint patrol at Nevay-deh village in Kandahar province on September 5, 2012.

Adminstrative dentention, which the US has frequently used to hold those they deem enemy combatants in Afghanistan, is against Afghan law, a panel ruled Monday, the Associated Press reported.

A judicial panel convened in Afghanistan concluded that detention without trial “has not been foreseen in Afghan laws,” according to a statement released by the office of President Hamid Karzai, the AP said.

This matters because it could significantly impact the ability of US forces to transfer custoday of detainees to their Afghan counterparts. US and coalition forces are in the process of drawing down the number of troops stationed in Afghanistan.

In a similar ruling last week, a New York district had blocked a US "statute authorizing the indefinite detention of terrorism suspects," The New York Times reported.

On Monday, the government filed an emergency appeal of the ruling, which it said "threatens irreparable harm to national security and the public interest by injecting added burdens and dangerous confusion into the conduct of military operations abroad during an active armed conflict,” according to a copy of the filing, the Times reported.

The US and Afghanistan are meant to draw up a security agreement in the near future, in advance of the complete withdrawal of foreign forces from the country, the AP reported.