Iraqi tribal leaders march during a ceremony marking Police Day at the police academy in Baghdad, Iraq, Thursday, Jan. 9, 2014. Elsewhere in the country, tribal leaders in Fallujah, 40 miles (65 kilometers) west of Baghdad, have warned al-Qaida fighters there to leave to avoid a military showdown.(AP Photo/Karim Kadim)

A suicide bomber detonated explosives Thursday among a group of recruits who were joining the Iraqi army to fight al Qaeda in Anbar province, the police said. Twenty-two recruits were killed, and 31 others were injured, officials said.

The recruits were lined up just outside the entrance gate at the Muthana airfield in Baghdad when the attacker blew himself up.

"We came to join the army to fight al Qaeda, and this will not stop us," said Ali Jasim, one of the recruits at the base. Jasim said the attack was an attempt by Sunni militants to stop the flow of government troops to Anbar, where al Qaeda fighters have taken control of significant parts of the two main cities, Ramadi and Fallujah.

The Shiite-led government of Prime Minister Nouri al-Maliki has called for new troops to join its fight against the militants in Anbar. Officials who spoke on the condition of anonymity said the recruits joining the army now were Shiites who would be deployed against the Sunni fighters after a short training period.

The fighting in Anbar has become increasingly complex, with shifting alliances and escalating sectarian tensions. Some fighters from Sunni tribes in the region are siding with the government, while other tribal forces oppose the military push in the province, seeing it as a heavy-handed attempt by al-Maliki to extend the influence of Iran, an ally of his government.

"Maliki's terrorist army has failed, and now he is trying to get new fighters," said Adnan al Muhana, a leader of one of the largest Sunni tribes in Anbar province.

He said it was notable that al-Maliki's recruitment drive had not won support from a potentially rich source of Shiite recruits in southern Iraq, suggesting that stronger loyalties existed between tribes than along sectarian lines.