Lebanese soldiers fired machine guns and rifles into the air and lobbed volleys of tear gas canisters at hundreds of angry protesters who tried to storm Lebanese government headquarters in Beirut on Sunday.

The chaotic scene in Lebanon’s capital on Sunday came during the funeral for a top intelligence official, Brig. Gen. Wissam Al-Hassan, who was killed, along with seven others, in a massive car bombing that many blame on Syrian President Bashar Assad’s regime.

Syrian condemned the attack soon after it occurred on Friday and denied its involvement in the bombing.

Several hundred protesters made it to within 50 meters (164 feet) of the entrance of Lebanon’s government palace, with thousands more behind them. The gunfire appeared to push the crowd back. Scores of Lebanese Army commandos marched into the streets wielding clubs.

The protesters believe the government is too close to Syria and to Damascus’ ally in Lebanon, the Shiite group Hezbollah.

Al-Hassan was buried in Beirut’s Martyrs Square next to the late prime minister Rafik Hariri. Security was tight as thousands of people headed to the capital from around the country to attend the funeral.

Policemen and soldiers cordoned off the square, searching people trying to enter and barring vehicles. Giant posters of al-Hassan were set up around Beirut ahead of the funeral, calling him a “martyr of sovereignty and independence.”

Ahead of the funeral, a memorial ceremony attended by government officials and al-Hassan’s wife Anna, his two sons, Majd and Mazen, and his parents, was held.

Former prime minister Saad Hariri, the leader of the anti-Syria Future Movement, on Sunday afternoon called on protesters to immediately “withdraw from the streets” and cease rioting. “We want Lebanon to remain peaceful and democratic,” Hariri said over the phone to his party’s Future News network.

Another former prime minister, Fouad Siniora, blamed al-Hassan’s death on the current government headed by Prime Minister Najib Mikati.

“I call on Mikati to leave power immediately, otherwise, he will be accused of providing a cover for the criminals responsible for the assassination,” Siniora said.

Siniora joined Hariri in calling for calm, saying “the use of violence is unacceptable and does not represent the image that we want.”

Al-Hassan, 47, was a powerful opponent of Syria in Lebanon. He headed an investigation over the summer that led to the arrest of former information minister Michel Samaha, a Lebanese politician who was one of Syria’s most loyal allies in Lebanon. Al-Hasssan was among eight people killed in the attack on Friday.

“He was killed while he was defending his country,” said Samer al-Hirri, who traveled from northern Lebanon to attend the funeral.

Even before the bombing, the civil war in neighboring Syria had set off violence in Lebanon and deepened tensions between supporters and opponents of Assad’s regime. The attack heightened fears that Lebanon could easily plunge back into cycles of sectarian violence and reprisal that have haunted it for decades.

In Tripoli in northern Lebanon, where gunfire and grenade attacks were reported between rival factions on Friday, the Daily Star reported that at least four people were wounded by sniper fire on Sunday. Sunni and Alawite groups have clashed repeatedly in the northern city this year, leaving dozens dead and wounded.

Dozens of anti-Syrian protesters erected eight tents near the cabinet headquarters in central Beirut, saying they will stay until Mikati’s government, which is dominated by the Shiite militant group Hezbollah and its allies, resigns. Hezbollah is Syria’s most powerful ally in Lebanon, which for much of the past 30 years has lived under Syrian military and political domination.

“The Syrian regime started a war against us and we will fight this battle until the end,” said protester Anthony Labaki, a 24-year-old physiotherapist who is a member of the right-wing Phalange Party. He said the protesters will not leave the area until Mikati’s government resigns and those behind al-Hassan’s killing are uncovered.

Syria’s hold on Lebanon began to slip in 2005, when Hariri, the former prime minister and an opponent of Syria, was assassinated in truck bomb along Beirut’s Mediterranean waterfront. Syria denied any role. But broad public outrage in Lebanon expressed in massive street protests forced Damascus to withdraw its tens of thousands of troops from the country.

For years after the pullouts, there was a string of attacks on anti-Syrian figures in Lebanon without any trials for those responsible. Assad has managed to maintain his influence in Lebanon through Hezbollah and other allies.

Samaha, the former minister arrested in al-Hassan’s investigation, remains in custody. He is accused of plotting a wave of attacks in Lebanon at Syria’s behest.

On Saturday, Mikati linked the bombing to the Samaha case.

“I don’t want to prejudge the investigation, but in fact we cannot separate yesterday’s crime from the revelation of the explosions that could have happened,” he said.

Mikati, who opponents say is too close to Syria and Hezbollah, offered to resign after the bombing. But President Michel Suleiman asked him to stay so as not to add to the instability.

Syrian Brig. Gen. Ali Mamlouk, one of Assad’s most senior aides, was indicted in absentia in the August sweep that saw Samaha arrested. Samaha’s arrest was an embarrassing blow to Syria, which has long acted with impunity in Lebanon.

The car bombing struck Beirut’s mainly Christian Achrafieh neighborhood and also wounded dozens of people, including children.

Many of Lebanon’s Sunni Muslims have backed Syria’s mainly Sunni rebels, while Shiite Muslims have tended to back Assad. Assad, like many who dominate his regime, is a member of the Alawite sect, an offshoot of Shiite Islam.

Al-Hassan was a Sunni who challenged Syria and Hezbollah.