At the same time, insider killings by uniformed Afghans against their foreign allies rose dramatically, eroding confidence between the two sides at a crucial turning point in the war and when NATO troops and Afghan counterparts are in more intimate contact.
"The overall situation is improving," said a NATO spokesman, US Air Force Lt. Col. Lester T. Carroll. He singled out Afghan special forces as "surgically removing insurgent leaders from the battle space."
Gen. Mohammad Zahir Azimi, spokesman for the Afghan Ministry of Defense, said Afghan forces were now charged with 80 percent of security missions and were less equipped to face the most lethal weapon of the militants – roadside bombs.
"Our forces are out there in the battlefields and combat areas more than at any other time in the past," he said, citing reasons for the spike in casualties.
US troop deaths, overall NATO fatalities and Afghan civilian deaths all dropped as insurgent attacks fell off in their traditional strongholds in the country's south and east. However, insurgent activity was up in the north and west, where the Taliban and other groups have been less active in the past, and overall levels of violence were higher than before a US troop surge more than two years ago.
US troop deaths declined overall from 404 last year to 295 as of Saturday. The Defense Department says 1,701 US troops have been killed in action in Afghanistan since the US invasion in 2001 until Dec. 26. Of those, 338 died from non-hostile causes. Some 18,154 were wounded.
A total of 394 foreign troops, including the Americans, were killed in 2012, down from 543 in 2011. The British, with the second-largest military presence, had 43 killed – the second-highest toll among countries with forces in Afghanistan, by AP's count.
The AP keeps daily tallies of casualties and violent incidents across Afghanistan based on reports from NATO and Afghan officials. Most cannot be independently verified, and other incidents may never come to light. The statistics sometimes vary from official counts because of time lags, different criteria and other reasons.
Deaths from so-called insider attacks – Afghan police and troops killing foreign allies – surged to 61 in 45 attacks last year compared with 2011, when 35 coalition troops were killed in 21 attacks.
The number, provided by the NATO command, does not include the Dec. 24 killing of an American civilian adviser by a female member of the Afghan police because the investigation is ongoing.
The focus of NATO's mission has largely veered from the battlefield to training the Afghans ahead of a pullout of most troops by 2014. The US plans to maintain a residual force, the size of which is now being determined.
A NATO report that tracks violence in the country showed a rise this year compared with the period before the surge of US troops into the country. But the levels were down from last year and a peak in the summer of 2010. Kabul and the country's second-largest city, Kandahar, saw a considerable drop in lethal attacks, but districts in Kandahar province remain among the most restive in Afghanistan.
Militant attacks, the report said, decreased countrywide by 7 percent through November compared with the same 11-month period last year. But they were up in the northern and western parts of the country, which previously had been among the most peaceful regions.
Although NATO officials frequently credit Afghan troops with successful unilateral operations, a recent US congressional report noted that higher-level Afghan units still need vital air, logistics and other support from foreign forces.
More Afghan police and soldiers are dying in the conflict, according to numbers provided by the interior and defense ministries.
More than 1,050 Afghan troops died this year, substantially higher than last year, although the ministry could not provide the exact 2011 death toll.
Nearly 1,400 police died in the 10 months from March 21 to the end of the year, compared with about the same number for the 12 months beginning March 21, 2011. The Afghan government follows a calendar year starting March 21.
NATO says Afghan security forces have grown from 132,000 in March 2011 to 333,000 this month.
The AP tally showed that at least 822 Afghan civilians had been killed by the Taliban and other militants this year while another 119 died in NATO airstrikes and other operations. That was a decrease from last year, when 1,151 were killed by insurgents and 283 by NATO. Substantially smaller numbers perish when caught in crossfires.
The United Nations reported different casualty figures but also noted that civilian deaths had decreased, reversing a five-year trend of mounting civilian deaths. Its latest report says that during the first six months of the year, 1,145 civilians died in conflict-related violence, compared with 1,510 in the same period of 2011. The UN considers insurgent land mines and roadside bombs to be particularly deadly for civilians.
Close to 3,000 militants were reported to have been killed by coalition and Afghan forces this year, compared with more than 3,500 last year. The NATO command does not issue reports on the number of insurgents its troops have killed, and Afghan military figures, from which the AP compiles its data, cannot be independently verified.