A suicide bomber has killed 22 Iraqi army recruits and wounded dozens of others in Baghdad, police say, a day after the country's prime minister pledged to wipe out al-Qaeda from the country.

A man with an explosive vest blew himself up on Thursday amid the recruits at the small Muthanna airfield used by the army in the Iraqi capital.

The attack came a day after fighters killed 12 soldiers and wounded four more at a military site in Al-Adhim, north of Baghdad.

No group immediately claimed responsibility for Thursday's attack. However, fighters opposed to the Iraqi government frequently target security forces with bombings and shootings.

Nouri al-Maliki, the Iraqi PM, had given a strong warning on Wednesday to an al-Qaeda-linked group that has taken over parts of the western Anbar province.

The Islamic State of Iraq and the Levant (ISIL), which is also active across the border in Syria, overran police stations in Fallujah and Ramadi, the provincial capital, last week.

"The Baghdad bombing does look like a revenge attack," Al Jazeera's Imran Khan said, pointing out that the Iraqi army is in parts of Anbar and the fact that Maliki is formulating a strategy to try and deal with ISIL fighters there.

"So we are likely to see more attacks like this as the crisis in Anbar continues."

This is the first time al-Qaeda-linked fighters have exercised such open control in major Iraqi cities since the insurgency that followed the 2003 US-led invasion.

'Unlawful methods' criticised

Maliki predicted victory in Wednesday's address as his army prepared to launch an offensive against the fighters.

His Shia-led government had asked last week for volunteers to join the military effort against al-Qaeda.

However, Human Rights Watch has condemned abuses by all sides in Anbar, criticising Iraqi government forces for using what it alleges is indiscriminate mortar fire in civilian neighbourhoods, and fighters for deploying in and attacking from populated areas.

"Apparently unlawful methods of fighting by all sides have caused civilian casualties and severe property damage," the New York-based watchdog group said in a statement on Thursday.

The fighting in Anbar has raged for more than a week and killed more than 250 people.

More than 13,000 families have fled Fallujah amid the fighting, the Iraqi Red Crescent Society (IRCS) has said, and continuing clashes between Iraqi security forces and Sunni Arab fighters are making aid-delivery a difficult job in the city.

"No one can safely enter some residential areas in Fallujah controlled by armed personnel, where fierce fighting continues," Mohammed Al Khuzai, the IRCS deputy director-general, said.

Some families have sought refuge in the neighbouring province of Karbala and as far away as the northern Kurdish region.

Source: Al Jazeera and agencies