Iraqi militants launched an attack on the northern city of Samarra, killing at least seven policemen before being repelled by helicopter gunships.
Military officials say the assault began early Thursday when militants advanced on the town in pick-up trucks, attacking checkpoints and police stations.
After entering the city, rebels took control of several areas, sparking heavy clashes resulting in casualties on both sides.
Officials say reinforcements from Iraq's special forces were sent to Samarra, along with helicopter gunships, in an attempt to push back militants.
Police say the gunmen were forced to withdraw from Samarra although smaller clashes were still taking place on the outskirts of the city.
The assault in Samarra comes as a standoff between anti-government fighters and security forces in Iraq's Anbar province enters its sixth month.
The militants, from the pro-al-Qaida Islamic State of Iraq and the Levant (ISIL), remain in control of the cities of Fallujah and parts of the provincial capital, Ramadi, since fighting began there in December.