BAGHDAD (AP) -- Four policemen were killed in two separate attacks in Iraq on Sunday in the latest strikes by insurgents against security forces, officials said.

A police officer in Ninevah province said gunmen opened fire on a security checkpoint in the northern city of Mosul, killing three policemen. The gunmen escaped unhurt after the attack.

Violence has ebbed in Iraq, but security forces are frequently targeted by insurgents. Many attacks are attributed to al-Qaida's local wing in Iraq, which seeks to undermine the government and reclaim areas where U.S. forces and their local allies drove them out. The last American troops withdrew from Iraq in December.

Mosul, a former al-Qaida stronghold, is 360 kilometers (225 miles) northwest of Baghdad.

Hours earlier, a car bomb exploded on a police patrol in the Iraqi capital, killing one policeman and wounding five people, including three policemen, said Baghdad police.

Hospital medics confirmed the death toll. All officials spoke under condition of anonymity because they were not authorized to talk to reporters.