The coalition was striking back against insurgents opposed to the Western-backed government of President Hamid Karzai who have stepped up attacks on foreign and Afghan troops.
The coalition said its troops called in airstrikes on the compound in the Shindand district of Herat province on Thursday.
Some 30 militants were killed and five others were detained, spokesman 1st Lt. Nathan Perry said. The troops found a haul of weapons and ammunition inside the compound, he said.
Afghan officials issued contradictory statements about what had happened and it was not immediately clear why they offered such differing accounts.
An Afghan Defense Ministry spokesman, Gen. Mohammad Zaher Azimi, confirmed the clash but said five of the 30 dead were civilians.
However, the Afghan Interior Ministry claimed that U.S. coalition bombs killed 76 civilians, including 19 women and 50 children under the age of 15. The ministry called the bombing a "mistake."
U.S. military spokeswoman Lt. Col. Rumi Nielson-Green said a thorough assessment was done after the battle and that the coalition knows it killed 30 militants, including a high-ranking Taliban leader.
"We stand by our account and our reports and what we know and I can't reconcile why (the Interior Ministry) would have a different figure," Nielson-Green said.
The operation was launched after an intelligence report that a Taliban commander, Mullah Siddiq, was inside the compound presiding over a meeting of militants, Azimi said. Siddiq was one of those killed during the raid, Azimi said.
A roadside bomb in the country's east, meanwhile, killed a U.S. coalition service member on Friday, the U.S. military said in a statement. The coalition did not provide other details on the incident or the victim's nationality.
Another roadside blast Friday hit an Italian army's armored vehicle some 12 miles north of Kabul, wounding three Italian soldiers Friday, the Italian Defense Ministry said.
Separately, Afghan and international troops clashed Thursday with militants in Khas Uruzgan district of Uruzgan province, killing 11 militants, said provincial police Chief Juma Gul Himat.
Three Afghan troops were wounded in the fight, Himat said. Authorities recovered the bodies of the dead militants, he said.
While most of Afghanistan's violence affects the southern and eastern regions that border Pakistan, militants have also been active in western areas bordering Iran.
In another clash Thursday involving airstrikes, the U.S.-led coalition said its forces killed "multiple militants" in the northern Kapisa province.
The operation in Tagab district targeted a Taliban commander involved in weapons smuggling and suicide attacks against Afghan and foreign troops, the coalition said.
Tagab is close to where militants killed 10 French troops on Tuesday in the deadliest ground attack on foreign troops since the Taliban were ousted from power in 2001.
More than 3,400 people - mostly militants - have been killed in insurgency-related violence this year, according to figures from Western and Afghan officials.