BAGHDAD — At least six Iraqi police officers and allied militiamen were killed early Saturday by U.S. airstrikes after Iraq's military apparently mistook them for armed insurgents.

The apparent friendly fire is being investigated by Iraqi and U.S. officials in Baghdad, and it already has provoked anger among critics of the United States who have long been suspicious of or hostile to its involvement in the fight against the Islamic State.

Iraq's joint-operations command — the umbrella for the country's military, police and militia forces — said that before dawn, a team of Iraqi troops backed by U.S. air power was searching in the Anbar province town of Baghdadi for a man with links to the Islamic State.

Once the militant was arrested, the Iraqi troops encountered an armed group they did not recognize and U.S. helicopters swooped in and opened fire, according to the command statement.

A spokesman for the U.S.-led anti-Islamic State coalition did not respond to a request for comment, but in a Twitter post, he said the incident is being investigated. He added that U.S. air support comes only at the request or by approval of the Iraqi military.

"NO unilateral coalition operations in Iraq," Army Col. Ryan Dillon said in the tweet.

Khalid al-Obaidi, a tribal leader in Baghdadi, said in a telephone interview that the airstrike also injured 20 people, including the leaders of Baghdadi's police and local council.

Iraqi cleric Moqtada al-Sadr, long a critic of the U.S. military presence in Iraq, demanded in a statement said the "American occupation proves its tyranny, its arrogance and its blatant aggression against the Iraqi government, its independence and its sovereignty, by indiscriminately and unjustly bombarding Baghdadi district which claimed innocent lives." Sadr, who also recently positioned himself as a nationalist who opposes Iranian meddling in Iraq, that the "aggressors" be punished.

On Thursday, the U.S.-led coalition reported that by the end of 2017, 831 civilians had been killed in coalition airstrikes during the three-year war against the Islamic State in Iraq and Syria.

However, independent monitor Airwars has called that number implausible given the intensity of the war, particularly in the Islamic State's self-declared capitals of Mosul and Raqqa. The group said its research has shown that up to 9,210 noncombatants had been killed by the end of last year.