Updated

Iraqi security forces hunted for militants and weapons in the Baghdad area on Sunday, while attacks killed six people, including three soldiers and a judge, officials said.

Iraqi authorities are struggling to contain the worst violence to hit the country in five years. About one thousand people died in attacks last month.

The defence ministry said security forces arrested 32 people wanted under an anti-terrorism law and detained a further 141 suspects over a period of 24 hours, during operation "Avenge the Martyrs" in areas north and west of Baghdad.

They also destroyed three "terrorist hideouts" and seized a car bomb factory, weapons, ammunition and explosives, a ministry statement said, adding that similar operations were conducted in other areas.

But more deadly attacks, which security forces have so far failed to stem, struck on Sunday.

In the northern province of Nineveh, a roadside bomb exploded near an army patrol, killing three soldiers. The blast, about 60 kilometres (35 miles) south of the provincial capital Mosul, also wounded four soldiers.

And another bombing targeted a police patrol further south, wounding three policemen.

In Tikrit, north of Baghdad, a car bomb exploded near a judge's house, killing him and severely wounding his wife, while another blast in the Iraqi capital itself killed one person and wounded five.

And gunmen killed a man and wounded his son west of the northern city of Kirkuk.

The attacks came a day after violence in Iraq killed 24 people, including nine soldiers.

Militants opposed to the Iraqi government frequently target security forces and officials with both bombs and gunfire.

Violence has increased markedly this year, especially since an April 23 security operation at a Sunni anti-government protest site that sparked clashes in which dozens died.

Protests erupted in Sunni-majority areas in late 2012, amid widespread discontent among Sunnis who accuse the Shiite-led government of marginalising and targeting their community.

Experts say Sunni anger is the main cause of the spike in violence this year.