BAGHDAD - At least 25 Iraqi fighters have been killed repelling a major three-day offensive by the Islamic State group in the western region of Haditha, security sources said Tuesday.

"We have given 25 martyrs in 72 hours," a tribal commander, Sheikh Abdallah Atallah, told AFP by phone from Haditha, an area that includes a key dam and has held off IS since 2014. "It was one of the biggest offensives we have seen. It came from three directions," he said, adding that dozens were also wounded.

The mayor of Haditha, located in Anbar province about 200 kilometres (120 miles) northwest of Baghdad, confirmed the casualty toll.

"We have more than 20 martyrs and more than 50 wounded. They are from the army, CTS (the counter-terrorism service), the police and the tribal fighters," Mabrouk Hamid said. "Haditha was targeted Sunday by a massive offensive involving more than 40 vehicles, all armoured and some explosives-laden," Hamid said. "They were destroyed by coalition and Iraqi air strikes," he said.

Both the mayor and tribal commander said IS had lost very large numbers of fighters in their failed assault.

The US-led coalition confirmed it provided support to the Iraqi forces defending Haditha, a strategic area where Sunni tribal fighters opposed to IS have resisted several previous waves of attacks.

"There have been several ISIL (IS) attacks near Haditha. None of these attacks have been successful" thanks to stronger aerial support, US-led coalition spokesman Colonel Steve Warren wrote on social media.

The jihadists appeared to make an offensive on Haditha - one of the most coveted prizes for the group in Iraq - their priority after losing control of the provincial capital of Ramadi a week ago.

Senior military commanders said when the security forces launched their offensive on central Ramadi late last month that IS had redeployed some of its assets further west in Anbar.

In the course of their latest offensive on Haditha and the neighbouring towns of Barwana and Haqlaniyah, further south along the Euphrates, IS was nonetheless able to seize a village called Sakrana, several sources told AFP.

"Daesh controls the village of Sakrana... but they are surrounded by our forces and we should clear it within hours," Atallah said, using an Arab acronym for IS. "They used 20 suicide car bombs just for Sakrana - this is why they were able to take it," he said.

Hamid also confirmed that IS fighters were inside the village, east of Haditha. The dam north of the city of Haditha is the country's second largest after the Mosul dam. Both sources also said families were trapped in a district just north of Barwana called Al-Shay, which IS fighters were able to seize.

"The area is only about two square kilometres. All the rest of the city and the main checkpoints are controlled by us," said Atallah, from the Jughaifi clan which has spearheaded tribal resistance to IS in the Haditha area. "Several families, including children, are besieged there," he said.

"Iraqi security forces are currently trying to rescue them," said Ziad al-Nimrawi, from Barwana police. They were not able to say exactly how many civilians were trapped in Al-Shay.