US-led forces were conducting an operation on Wednesday in the town, about 65km north of Baghdad, when they came under heavy fire, a statement said.
In response, the US military said its forces called in an air strike, which killed four fighters.
A search of the destroyed building led to the discovery of the bodies of four women who were also killed in the strike, the statement said.
However, relatives of the dead said that those killed were a family of seven and a neighbour.
“The Americans killed my relatives who had no guilt or relation with any group,” Saleh Ali, a relative of the victims, told AP news agency.
Another relative told Reuters she had been preparing for the Ramadan morning meal when she heard explosions and shootings.
“When I came back I saw all my family killed. My father – four women and three men. All of them, including my brother and his pregnant wife.”
Baquba is in Diyala province, where many locals are hostile to US forces and al-Qaeda fighters are said to have strong influence.
The US military said it had attempted to avoid civilian casualties “while in pursuit of terrorists”.
“Terrorists continue to deliberately place innocent Iraqi women and children in danger by their actions and presence,” the statement said.
Major-General William Caldwell, a US military spokesman, said that US-led forces have been engaged in a crackdown on the al-Qaeda in Iraq group in the region for the past few weeks.
Elsewhere in the province on Wednesday, a road-side bomb exploded next to a police patrol, killing two policemen and two prisoners, police said.
The US army also said on Wednesday that a US marine and a US soldier were killed in action on Monday in the western province of al-Anbar.