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.Immediately after the car exploded, gunmen assaulted the headquarters, battling the building's guards in a 15 minute firefight, according to police officials.Defense Ministry spokesman Maj. Gen. Mohammed al-Askari told the Associated Press television that some of the gunmen were wearing explosives belts and were planning a second blast."The plan was to strike twice," he said. "First with a car bomb and then with suicide bombers."Police and hospital officials said two people were killed by the blast and then six more died in the ensuing firefight. There were five soldiers among the dead.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 a match for the well-armed insurgency determined to bring down the Shiite-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.