Kabul, Afghanistan (CNN) -- Afghanistan and the United States may soon reach a deal over night raids by U.S. and Afghan special forces on local dwellings that would increase Afghan control over and participation in the controversial operations.
Night raids are deeply unpopular among Afghans, but U.S. officials say they are vital to NATO's operation against insurgents.
One Afghan official stressed the deal would mean night raids complied with Afghan laws. A U.S. official insisted any compromise would not impede NATO's effectiveness.
"There has been some very good progress," President Hamid Karzai's spokesman Aimal Faizi said. "Both sides are very close to agreement on a memorandum of understanding under which all night operations will be fully Afghanized and conducted under Afghan laws."
Pentagon spokesman George Little said, "We believe we are still making progress toward a resolution on the agreement." But, he said, there's no specific timing on resolving the issue.
Another U.S. official declined to comment "on the specifics of ongoing negotiations."
"A memorandum of understanding will be in accordance with the ongoing process of Afghanistan of special operations as required by the November loya jirga and will meet U.S. operational needs," the official said. A loya jirga is a national assembly of tribal elders.
Talks have been going on for weeks now on this key memorandum of understanding to address what is perhaps the most difficult issue in the partnership between Kabul and Washington.
The agreement would remove one of the obstacles in the way of a highly symbolic Strategic Partnership Document, outlining the basis for U.S.-Afghan cooperation for the years after NATO's 2014 drawdown.
Night raids also present a particular challenge to Karzai. Their strong unpopularity has forced the president to demand they stop, or at least no longer involve foreign troops, despite their operational significance to NATO.
Gen. John Allen, who commands U.S. and NATO troops in Afghanistan, last month told Congress how vital and frequent those raids are.
Allen said that in 2011, 83% of the raids succeeded in detaining or striking either their primary target or an associated insurgent.
"This last year, we had about 2,200 night operations," he told the Senate Armed Services Committee.
"Of those 2,200 or so night operations, on 90% of them we didn't fire a shot. On more than 50% of them we got the targeted individual, and (in) 30% more we got the next associate of that individual as well."
As for civilian casualties, in the 10% of the night raids where shots were fired, "less than 1.5 % civilian casualties" resulted, Allen said.
Pentagon spokesman Little told reporters Wednesday that over 97% of the night raids are combined U.S.-Afghan operations, and almost 40% of the night raids are now Afghan-led.
A senior Afghan official said details of the arrangement on night raids were changing daily and meetings were ongoing, but the issue of compliance under Afghan law was key to the talks. A legal process, such as the issuing of a warrant of arrest, would have to take place before any raids happened, the official said.
It would not be enough -- as suggested in some reports -- if the legal process just involved asking a judge after the raid for permission to keep any detainees captured in custody, the official said.
Karzai says Afghanistan's homes and villages need to be safe and protected.
"What we are asking for, in very specific and clear terms, (is that) no foreign forces should enter Afghan homes," he said last year.
Secretary of Defense Leon Panetta said last month that while it's important that such operations continue, the United States is making changes.
Allen said last month that "we have come a very long way in creating greater capacity among the Afghans to conduct night operations in a very credible way."
"Now, we're still heavily partnered with them, and we will be for some period of time, but ... all of our night operations are partnered with Afghan partner unit forces."
CNN's Larry Shaughnessy contributed to this report.