The militants, travelling in dozens of vehicles, some mounted with anti-aircraft guns, attacked a major checkpoint on the southeast side of Samarra, killing the security forces guarding it and burning their vehicles, witnesses said.
They then took control of several areas of the city, north of Baghdad, according to witnesses, who reported seeing the bodies of both security forces and gunmen in the streets.
An AFP journalist saw helicopters firing into the city.
A police major and a doctor said six police had been killed and 24 people wounded in the fighting.
More From This Section
The assault comes as a standoff between anti-government fighters and security forces in Iraq's Anbar province, west of Baghdad, enters its sixth month.
The city of Fallujah, just a short drive from Baghdad, and some parts of provincial capital Ramadi, farther west, have been outside government control since early January.
Violence is running at its highest levels since 2006-2007, the height of the country's Sunni-Shiite sectarian conflict.
And over 4,000 have been killed so far this year, according to an AFP tally.
Officials blame external factors for the rise in bloodshed, particularly the civil war in neighbouring Syria, and insist wide-ranging operations against militants are having an impact.
But the violence continues unabated, with analysts and diplomats saying the Shiite-led government needs to do more to reach out to the disaffected Sunni Arab minority to reduce support for militancy.