The decision came to light after an NBC News correspondent's blog carried a photograph of the insurgents. Defense department officials first tried to block further publication of the photo, then struggled to explain what it depicted.
NBC News claimed U.S. Army officers wanted to attack the ceremony with missiles carried by an unmanned Predator drone but were prevented under rules of battlefield engagement that bar attacks on cemeteries.
In a statement released Wednesday, the U.S. military in Afghanistan said the picture — a grainy black-and-white photo taken in July — was given to a journalist to show that Taliban insurgents were congregating in large groups. The statement said U.S. forces considered attacking.
"During the observation of the group over a significant period of time, it was determined that the group was located on the grounds of (the) cemetery and were likely conducting a funeral for Taliban insurgents killed in a coalition operation nearby earlier in the day," the statement said. "A decision was made not to strike this group of insurgents at that specific location and time."
While not giving a reason for the decision, the military concluded the statement saying that while Taliban forces have killed innocent civilians during a funeral, coalition forces "hold themselves to a higher moral and ethical standard than their enemies."
The photo shows what NBC News says are 190 Taliban militants standing in several rows near a vehicle in an open area of land. Gunsight-like brackets were positioned over the group in the photo.
The photo appeared on NBC News correspondent Kerry Sanders' blog. Initially military officials called it an unauthorized release, but they later said it was given to the journalist.
NBC News had quoted one Army officer who was involved with the spy mission as saying "we were so excited" that the group had been spotted and was in the sights of a U.S. drone. But the network quoted the officer, who was not identified, as saying that frustration soon set in after the officers realized they couldn't bomb the funeral under the military's rules of engagement.
Defense Department officials have said repeatedly that while they try to be mindful of religious and cultural sensitivities, they make no promises that such sites can always be avoided in battle because militants often seek cover in those and other civilian sites.
Mosques and similar locations have become frequent sites of violence in the U.S.-led wars in Iraq and Afghanistan, and they have often been targets of insurgents and sectarian fighting in Iraq.