Iraqi troops backed by helicopter gunships fought on Saturday to retake full control of a northern town from militants who overran parts of it earlier this week, the mayor and other local officials said, Reuters reported.
Talib Mohammed, the mayor of Sulaiman Pek, 160 km (100 miles) north of Baghdad, said the army had met fierce resistance in some parts of the town, after gaining some ground on Friday.
"Snipers and roadside bombs are preventing the army from totally controlling the town," he said. "A police captain was killed by a sniper this morning while he was trying to evacuate his family."
Militants raised the black flag of the Islamic State in Iraq and the Levant (ISIL) - a Sunni group also fighting in neighboring Syria - over parts of Sulaiman Pek on Thursday.
An army captain in Sulaiman Pek said snipers were hindering bomb disposal teams faced with dozens of explosive devices.
"Our job is not easy, it's a guerrilla war," said Captain Falah Abdul-Ameer. "Snipers are a big issue now. We can't work out their exact location, they shoot and change places."
South of Baghdad, ISIL militants killed at least eight soldiers in overnight clashes in Jurf al-Sakhar, 60 km (40 miles) from the capital, army and police sources said.
They said 12 militants were also killed in the fighting, which started when the army responded to reports of insurgents gathering in the swamps and orchards in the area.
ISIL and other Sunni Muslim rebels have gained strength in Iraq over the past year. On January 1 they seized the city of Falluja in the western desert province of Anbar. They also have footholds in Ramadi, the nearby provincial capital.
Prime Minister Nuri al-Maliki visited an army base west of Ramadi on Friday night to meet military commanders and tribal leaders, and discuss army operations, local officials said.
During the visit to al-Assad base, Maliki promised 10,000 jobs in the security forces for tribal fighters who have sided with the government against militants, the officials said.
Fighting erupted in Ramadi between militants and security forces backed by tribesmen early on Saturday, police and local officials said. Helicopters bombarded militant positions in central areas of the city, amid explosions and gunfire.