At least 17 troops were killed in clashes between Iraqi forces and Islamic State militants in western Anbar province on Wednesday, officials said.
A police officer, an army officer and a Sunni tribal fighter said the deadliest clashes took place east of Islamic State-held Ramadi, where six soldiers, four Sunni tribal fighters and two police officers were killed. Nine other troops were wounded.
They say another five soldiers were killed and nine wounded when militants attacked troops near the Habbaniyah military base, where dozens of American advisers are stationed.
Iraqi troops, backed by Shiite militiamen and Sunni tribal fighters, launched an operation to retake Anbar last month. The US-led international coalition is launching airstrikes on militant positions. Late last month, the government forces recaptured the University of Ramadi, located 5km (3 miles) south of Ramadi.
The Islamic State group seized large parts of Anbar in early 2014 and captured Ramadi in May. Iraqi forces, which had been making steady progress against the extremists in recent months with the help of the air campaign, scored a major victory in recapturing Saddam Hussein's hometown of Tikrit in April.
Also Wednesday, militants detonated bombs in commercial areas of the capital, Baghdad, and in northeastern Diyala province, killing at least eight civilians and wounding 31, police and medical officials said.
No one claimed responsibility for these attacks, but Iraq sees near-daily bombings that are often claimed by the Islamic State group. All officials spoke on condition of anonymity as they were not authorized to speak to journalists.