BAGHDAD - Militants detonated a car bomb at a Baghdad military headquarters on Sunday and then tried to shoot their way into the building, killing eight people and wounding 29 in a brazen morning attack, Iraqi officials said. Spokesman Maj. Gen. Qassim al-Moussawi said guards at the eastern Baghdad military command building in the Bab al-Muadham neighborhood opened fire at the car as it came speeding toward the building before exploding. Immediately after the bomb, gunmen assaulted the headquarters and tried to shoot their way in during a 15 minute firefight with the building's guards, according to police officials. Al-Moussawi did not mention the firefight and said only five people, including three soldiers were killed. Police and hospital officials, however, maintained that eight people died in the attack, including five soldiers. Such discrepancies in the number of dead are usual in the chaotic aftermath of attacks. Officials spoke on condition of anonymity because they were not authorized to speak to the press. Security has been high in Baghdad in past days in anticipation of a new wave of attacks to mark the change in the US mission. Insurgents have intensified their strikes on Iraqi police and soldiers, making August the deadliest month for Iraqi security personal in two years. The building attacked on Sunday is the headquarters for the Iraqi Army's 11th Division and an army recruitment center. In mid-August, the building was targeted by a suicide bomber who killed 61 people lined up outside on a recruiting day trying to get jobs. The Iraqi security forces are now solely responsible for protecting the country after President Barack Obama declared an end to US combat operations on Wednesday. Many, however, doubt that Iraq's police and army are match for the well armed insurgency determined to undermine the Shi'ite-led government. Prime Minister Nouri al-Maliki, a Shiite, is struggling to keep his job after his political coalition came in a close second to a Sunni-dominated alliance in March parliamentary elections. Six months later, there is still has no new government. US and Iraqi officials have long worried that political instability would lead to widespread violence in Iraq, and the lack of a power-sharing agreement among the competing leaders has only increased fears. Last week al-Maliki put his nation on its highest level of alert for terror attacks, warning of plots to sow fear and chaos in the country. He said insurgents would try to exploit widespread frustration with years of frequent power outages and problems with other public services by staging riots and attacks on government offices.