Four military guards were killed after suicide attackers drove vehicle bombs into the military HQ in the heart of Damascus, Syrian officials say.
State TV contradicted earlier official accounts that no-one had died. It quoted army sources saying that 14 others were hurt in the attacks.
The rebel Free Syrian Army and an Islamist group called Ansar al-Islam both said they carried out the attack.
State TV broadcast footage of a minibus slowing before exploding at the HQ.
Gunfire reverberated around the city for hours after the bombings, as rebels fought with soldiers at the compound.
Official media said "terrorist attackers" had opened fire inside the perimeter of the compound and in nearby streets, and security forces had confronted them.
As well as this attack, Ansar al-Islam has also said it was behind another assault on a school on Tuesday it said was being used by security forces and militiamen.
State TV said those killed were guards at the compound, and both civilian and military personnel had been wounded.
Witnesses said the blasts ignited a fire that engulfed much of the main building that houses the army's General Staff.
State media insisted earlier that no senior officers were hurt.
The blasts happened early in the morning close to one of the city's busiest areas, Umayyad Square, which is dominated by government buildings.
Roads leading to the area were blocked off as the authorities dealt with the aftermath.
Diplomats living close to the area said the blasts were the biggest they had heard for months.
Buildings more than 1km (half a mile) away shook violently under the force of the explosions.
The BBC's Rafid Jabboori in Damascus says the target and timing are very significant.
The staff command compound represents the heart of the Syrian army, he says.
And the attack comes days after the Free Syrian Army announced it had moved its command from Turkey to Syria in an apparent attempt to bolster its fight against regime forces.
BBC cameraman Phil Goodwin was in a hotel nearby when the attack struck.
"The first blast shook the entire building I was in and sent a huge plume of smoke in the sky," he said.
Damascus resident Jean-Pierre Duthion told the BBC that his building also shook and windows were shattered.
In other developments:
- Iranian news channel Press TV says one of its reporters, named as Maya Naser, was shot near the scene of the attack, while the bureau chief of Iran's Arabic-language TV channel was wounded
- The pro-opposition Syrian Observatory for Human Rights says 40 bodies were found in the town of al-Dhiyabiyeh near Damascus and that pro-government militiamen murdered 16 civilians in their homes in Damascus in the early hours of Wednesday
Security measures were stepped up around the military compound after a rebel attack in July killed several senior security officials, including the defence minister and President Bashar al-Assad's brother-in-law.
Although the attack is a spectacular coup, the rebels do not seem to have caused high-level military casualties, or to have taken and held ground, the BBC's Jim Muir in Beirut reports.
And they have diverted attention from terrible carnage elsewhere, including in nearby suburbs, where activists say dozens of people have been summarily executed by regime forces.
For much of the past 18 months, rebel groups have been fighting against Mr Assad's regime.
Activists estimate more than 27,000 people have died in the violence, which has erupted in cities across the country.
Repeated efforts by the international community to find a diplomatic solution have foundered because of a deep divide at the UN Security Council.