A suicide bomber attacked a military base in the Iraqi town of Taji on Monday, killing at least 19 people, in the latest assault by insurgents trying to undermine the government.
In central Baghdad an explosion in a car park at Iraq's parliament killed at least one person and wounded several others, including a politician, security officials said.
The Taji bombing was the third major attack in the last five days and underscored the fragile state of security as Washington prepares to pull out its remaining 14,500 troops by the end of the year, nearly nine years after the invasion that ousted Saddam Hussein.
The attacker detonated explosives packed into a minibus at the entrance to the base, which houses a jail holding prisoners from al Qaeda, the Mehdi Army militia and other groups, officials and security sources said. Taji is 20 km (12 miles) north of Baghdad.
Today was the day for the prisoners to meet their families ... At the entrance, there was a minibus driven by a suicide bomber, said a duty officer at the jail. It entered from the first checkpoint and before the police finished their search this guy drove quickly inside the base and blew it up.
Baghdad's security operations centre said the blast killed 19 people, including 11 jail guards, and wounded 24 others.
Two other people were missing, security sources said.
Violence has dropped sharply since the peak of sectarian slaughter in 2006-07. But Iraqi security forces still struggle to contain daily attacks by Sunni Muslim insurgents tied to al Qaeda and rival Shi'ite Muslim militias.
Militants launch scores of bombings and other attacks every month. According to official government figures, 161 civilians were killed in violence in October, the highest toll of the year, along with 97 police and soldiers.
Iraqi and U.S. military officials have said Iraq may see an increase in attacks as American troops depart. Soldiers and police are frequent targets.
The explosion in the parking lot of the Iraqi parliament was caused by a mortar round, said Baghdad security spokesman Qassim al-Moussawi and several other sources. However, at least two sources at parliament said it was a car bomb.
Militants frequently lob mortars and rockets at Baghdad's heavily fortified Green Zone, which houses parliament, ministries and foreign embassies.
Two security sources said the blast killed one person and wounded six others. Two other police sources said three people died and nine were wounded.
Among those hurt was lawmaker Muayad al-Tayyeb, the spokesman for the Kurdish bloc in parliament, one of his colleagues said.
On Saturday attackers struck two areas around the Iraqi capital, killing at least 13 people and wounding more than 20 others. In the southern oil hub of Basra on Thursday three bombs exploded in a busy market, killing 21 and wounding 80.
The town of Taji, the site of a major Iraqi military base, was hit by bombers in July, when two blasts in the parking lot of a municipal government building killed at least 28 people and wounded scores of others.
On November 14, seven rockets landed in or near the U.S. military's Kalsu base near Iskandariya, 40 km (25 miles) south of Baghdad, wounding two Iraqi civilians living near the base, local police said.
(Writing by Jim Loney; Editing by David Stamp)