Twenty people were killed yesterday as suicide bombers attacked Iraqi police and soldiers casting their vote early for a national election, authorities and witnesses said.

Sunni Muslim militants, mostly disguised in army and police uniforms, struck at polling centres around Baghdad and northern Iraq as militants tried to disrupt Iraq's fourth national election since the fall of Saddam Hussein in 2003.

A curfew begins tonight as ordinary Iraqis prepare to vote tomorrow. Security forces are at war with the al-Qaeda offshoot the Islamic State of Iraq and the Levant in western Anbar province and other areas encircling the capital. Prime Minister Nuri al-Maliki is battling for a third term in office but faces fierce opposition from political opponents, with sectarian violence in the Shi'ite Muslim-majority country at its most intense since 2008. In the western Mansour district of Baghdad, six police died and 16 others were wounded when a suicide bomber dressed as a policeman detonated his explosives at the entrance of a school being used for voting, police and medical sources said.

In the Sunni neighbourhood of Adhamiya, a bomber blew himself up in front of another polling centre, killing four soldiers and wounding seven. Ahmed Sultan was waiting to vote.

"We saw a person in army uniform coming out from a side street. He started to run in our direction. We all started to flee after realising he was a bomber," the soldier said. He said that while he was running a powerful blast threw him.

ISIL, which wants a Sunni Muslim Caliphate, has threatened Sunnis with death if they vote.

In northern Iraq, where ISIL has been attacking the security forces with ambushes and assassinations and by blowing up their homes, at least 10 police were killed.

In Tuz Khurmatu, a suicide bomber wearing a police uniform blew himself up by a polling station, killing three policemen and wounding nine, police said.

A bomber in a police uniform blew himself up and six policemen by a voting centre in Kirkuk.

One soldier was killed and four wounded when a suicide attacker in an army uniform blew himself up near a polling station in the town of Hawija, 70 km (40 miles) southwest of the northern city of Kirkuk, police said.