RAMADI, Iraq (AP) -- An Iraqi special forces patrol moves on foot past ruined homes on the outskirts of Ramadi, a city west of Baghdad where al-Qaida-inspired militants have held off the military for three months. As they head down an alleyway, shots from snipers ring out, followed by grenade blasts.
The troops take shelter behind walls and Humvees and return fire. No one is wounded and the operation continues.
A short while later the unit is clearing a house. They blow open the outer gate with a charge and a bomb expert goes inside. He pronounces the building safe to enter and calls on the rest of the soldiers to search it. Moments later a huge explosion collapses the building, shakes the ground and sends dust billowing in the air.
The house was booby-trapped. Four soldiers are killed and 10 are wounded.
"God curse Daesh," one junior officer swore, using the Arabic acronym for the Islamic State of Iraq and the Levant, the al-Qaida spin-off group leading the militants. Soldiers nearby said they could hear the militants taunting them through loudspeakers: "Our slain are in Heaven, while your slain are in Hell."
This grueling urban warfare in the Ramadi suburb of al-Bakir, witnessed by an Associated Press reporter on Thursday, is part of a deadly standoff pitting government forces and allied tribal militias against the Islamic State and allied militants in Anbar province, the heartland of Iraq's Sunni minority. The militants hold part of the provincial capital of Ramadi and nearly all of the nearby city of Fallujah.
It's the biggest challenge yet to the Shiite-led government of Prime Minister Nouri Al-Maliki and has dragged on far longer than officials had expected, costing the lives of scores of Iraqi soldiers. It is likely to disrupt voting in elections scheduled for the end of April, shaking the credibility of the government.
Anbar operations commander Lt. Gen. Rasheed Fleih says U.S.-trained special forces are taking the lead in fighting since the regular Iraqi army lacks experience for this kind of warfare. He says more than 100 Iraqi soldiers have been killed and 400 wounded in three months of fighting, while about 250 militants have been killed.
He estimates the number of militants at around 1,000 fighters in Fallujah alone, half of them foreigners.
The government says it is making progress in the battle. The al-Bakir operation was intended to clear our insurgents from this middle-class suburb and re-establish government control.
But Lt. Gen. Ali Ghaidan, commander of the army's ground forces, says that Iraqi military commanders did not expect that the fight against armed groups in Anbar would take such a long time. He blames the intelligence agencies for providing bad information. The militants are equipped with anti-tank guns and advanced sniper rifles and their favorite tactic is booby-trapping houses, said Ghaidan, who was inspecting units around Ramadi when the AP visited.
The militants took control of Fallujah and parts of Ramadi in late December, taking advantage of a months-long surge in Sunni discontent against al-Maliki's government. The takeover was sparked when security forces arrested a Sunni lawmaker sought on terrorism charges, then dismantled a year-old Sunni anti-government protest camp.
Taking the lead in the fighting is the Islamic State, an extremist group with which al-Qaida recently broke ties. Emboldened by fellow Sunni fighters' gains in the Syrian civil war, it has tried to position itself as the champion of Iraqi Sunnis angry at the government.
Their main ally is the Military Council For Tribal Revolutionaries. It's a mixture of tribal representatives and militants drawn mainly from the Saddam Hussein-era army. They don't pledge allegiance to ISIL, but avoid confronting them.
In Fallujah, history is repeating itself. A decade ago the Islamic State's jihadi predecessors took a high-profile role in defending the city against U.S. forces in the biggest battle of the Iraq War, boosting the group's profile and allowing it eventually to eclipse other insurgent groups.
The al-Qaida-aligned jihadis, or holy warriors, ultimately alienated many Sunnis with their hard-line ideology, and many in Fallujah ultimately fought against them. Now the Islamic State is trying to repair its image in the city. They have cleared garbage and planted flowers in road medians and allow some practices -- like barbers trimming beards -- that in years past they would have considered haram, or forbidden.
The Iraqi army talks a tough line. Acting Defense Minister Saadoun al-Dulaimi said that his forces are determined to continue the fight as along as it takes.