Iraqi security forces battling fighters of the Islamic State and the Levant (ISIL) are slowly regaining some ground from the armed group in the western city of Ramadi, security and local officials said.
The fighters began advancing on Ramadi two weeks ago, causing local officials to warn it was about to fall and precipitating more than 100,000 people to flee their homes in and around the capital of Anbar province.
Security officials said ISIL fighters were being pushed back from sections near the military's Anbar operation command but booby-traps, snipers and suicide attacks were hindering government troops from recapturing other areas they lost last week.
"We're engaged in tough guerrilla warfare in Ramadi," said an Iraqi security officer whose unit is fighting in Ramadi.
Speaking on condition of anonymity, he said the fighters had dug tunnels between houses so they could carry out hit-and-run attacks.
Anbar provincial council member Falih al-Essawi said security forces were taking their time in advancing to avoid exposing themselves to sniper fire.
A spokesman for Iraq's counterterrorism forces, which are taking a lead role in the battle, told the Reuters news agency the troops had managed to recapture positions near the city centre.
"Our main goal is to drive ISIS terrorists away from residential parts of the city towards open areas to make them an easy target for our forces," Sabah al-Noamani said, using an alternative name for ISIL.
ISIL suffered a major defeat this month when Iraqi troops and Shia militias expelled its fighters from Tikrit in the province of Salahuddin, but showed they could still strike by attacking Ramadi and Iraq's largest refinery in the north.
Iraqi forces regained control over most of the Baiji refinery at the weekend, but the fighters made an incursion into the northern part of the sprawling complex late on Tuesday and briefly took over a key installation.
"We managed to repel the Isis attack and drive them out of one of the installations this morning, but they still have a foothold near the southern gate of the refinery, and we need more reinforcements to take them out," said a police colonel by telephone from inside the complex.
In a separate incident, a car bomb blast killed seven people and wounded 13 in Baghdad's northern Talbiya neighbourhood, police and medical sources said.