(Adds details from blast and quote)
BAGHDAD, Nov 6 (Reuters) - A suicide bomber rammed his explosive-filled car into soldiers outside an army base near Baghdad on Tuesday, killing 31 people and injuring tens more in one of the worst attacks this year on the country's military.
Bombings and attacks have eased sharply since the height of Iraq's sectarian strife in 2006-2007, but al Qaeda's local affiliate and other Sunni Islamist insurgents often target local security forces and Shi'ite Muslims to stoke tensions.
The bomber drove his car into crowds of troops and recruits outside the base in Taji, 20 km (12 miles) north of the Iraqi capital, leaving body parts and burned vehicles scattered in the streets outside, police and hospital officials said.
At least 31 people were killed, mostly soldiers, and another 50 people were wounded in the blast, a hospital source said.
"There were army trainees leaving the base and small buses were waiting for them when the explosion took place," said Ahmed Khalef, a policeman working nearby. "We immediately started to rescue the wounded. You could smell of charred bodies."
Insurgents in Iraq have carried out at least one major attack a month since U.S. troops withdrew from the country in December last year. Now Iraqi officials worry Islamists may be gaining a moral and financial boost from the Syrian crisis.
Bombings at the end of October killed more than 40 people, including some in blasts in Shi'ite neighbourhoods in Baghdad and an attack on an Iranian pilgrim bus during the Islamic Eid al Adha festival.
Sunni Islamists and al Qaeda's affiliate, Islamic State of Iraq, often hit Shi'ite pilgrims and religious sites in an attempt to drive the country back to widespread sectarian killing. They target security forces to try to weaken the government of Shi'ite Prime Minister Nuri al-Maliki. (Reporting by Baghdad newsroom; writing Patrick Markey)