The US military has deliberately conducted an airstrike on a hospital in the Iraqi city of Mosul, it said on Wednesday, after saying its Iraqi allies came under fire by Islamic State fighters from the hospital complex.

US Central Command (Centcom) said it launched a “precision strike” on a building within the al-Salem hospital complex from which Isis fighters had for more than a day launched “heavy” machine gun and rocket-propelled grenade fire on Iraqi forces.

The coalition did not say if any patients or civilians were present at the scene of the airstrike on the “building on the hospital complex” nor did it answer a question about any noncombatants being killed or wounded.

It is also unclear if the strike ended the described threat from Isis fighters at al-Salem hospital, on the east side of the besieged city. US and Iraqi fighters have for weeks battled to regain control of Mosul, Iraq’s second city, Isis’s last major redoubt in the country.

The Iraqis requested the aerial support, Centcom said in a Wednesday statement, after taking sustained fire from Isis within the complex following a day-plus-long push to take the hospital back.

The Guardian is unable to independently verify Centcom’s account at present. Social media accounts have published video purporting to show Isis conducting suicide bombings with explosive-laden vehicles at the hospital complex, which Centcom alluded to in its statement.

Over the past two years, airstrikes from a variety of militaries – US, Russian and Saudi – have hit hospitals in Afghanistan, Syria, Yemen and now Iraq. Human rights groups have warned that the increase in attacks on hospitals threatens to deal a durable blow to the recognized concept of sanctuaries in war.

In a poll released this week, the International Committee of the Red Cross found that 82% of people surveyed in 16 countries considered it wrong to attack “hospitals, ambulances and health-care workers in order to weaken the enemy”. The proportion of people agreeing drops to 79% when only residents of the US, Russia, China, UK, France and Switzerland are questioned.

In October 2015, a US AC-130 gunship opened fire on a Médecins Sans Frontières hospital in Kunduz, Afghanistan, a city the Taliban had overrun. The strike left 42 civilians dead.

The US military changed its account of the disaster multiple times in the days after the Kunduz airstrike. Critically, it said the strike hit insurgents who were staging attacks on US and allied Afghan fighters, only to determine through a subsequent military investigation that no enemy fighters operated out of the hospital, and US had confused the hospital for a different area used by the Taliban.