BEIRUT — A Hezbollah commander and several fighters have been killed inside Syria, a Lebanese security official said Tuesday, a development that could stoke already soaring tensions over the Lebanese militant group’s role in the civil war next door.

Hezbollah’s reputation has taken a beating over its support for the Syrian regime, but any sign that the group’s fighters are taking part in the battle raises fears the conflict could expand into a wider fight engulfing the region.

Hezbollah has stood by Syrian President Bashar Assad since the uprising began 18 months ago, even after the group supported revolts in Egypt, Tunisia, Libya and Bahrain.

Assad’s fall would be a dire scenario for Hezbollah. Any new regime led by Syria’s majority Sunni Muslims would likely be far less friendly — or even outright hostile — to Shiite Muslim Hezbollah. Iran remains the group’s most important patron, but Syria is a crucial supply route. Without it, Hezbollah will struggle to get money and weapons as easily.

The Syrian uprising has left Assad deeply isolated — making his remaining allies such as Iran and Russia all the more important. At last week’s gathering of world leaders at the United Nations, dozens of nations excoriated the Assad regime for its role in a conflict that activists estimate has killed at least 30,000 Syrians.

It was not immediately clear how the Hezbollah militants were killed or whether they had been fighting alongside the Syrian army. But Hezbollah’s newspaper al-Intiqad said Hezbollah commander Ali Hussein Nassif, who is also known as Abu Abbas, was killed “while performing his jihadi duties.” It did not say when or where he was killed.

A Lebanese security official said Nassif was killed in Syria and his body was returned to Lebanon through the Masnaa border crossing on Sunday. Speaking on condition of anonymity because he is not authorized to speak to the media, the official said the bodies of several other Hezbollah fighters have been brought back to Lebanon in recent days.

Hezbollah spokesman Ibrahim Moussawi on Tuesday confirmed the deaths of the Hezbollah members but said he had no further information on where or how Nassif was killed. He declined further comment.

The Syrian opposition has long accused the group of helping the Syrian leadership crack down on the uprising — a claim the group has repeatedly denied. Hezbollah has to tread a careful path with its support for the regime, mindful that many of its supporters in Lebanon dread getting sucked into the conflict.

Nassif’s funeral, which was held in the eastern town of Budai, near Baalbek, was attended by top Hezbollah officials including the head of the judicial council and the political bureau, an indication of Nassif’s high prestige.

On Tuesday, Hezbollah’s Al-Manar TV showed the funerals of at least two other Hezbollah members it said were killed while performing their “jihadi duty.” Both funerals were attended by Hezbollah officials and commanders.

The coffins of the dead were draped with Hezbollah’s yellow flags and carried by militants in black uniforms and red berets. Hundreds of people marched in the funeral.

Samer al-Homsi, an activist in Syria’s central Homs province, which borders Lebanon, said Nassif was killed Saturday when a roadside bomb went off as the car he was in passed just outside the town of Qusair. He said Nassif and several other people were killed in the blast.

“His job was to coordinate with Syrian security agencies,” al-Homsi said via Skype.

He added that the rebels detonated the bomb “without knowing” that the target was a Hezbollah official. “We knew he was a Hezbollah official after it was announced by the group in Lebanon,” he said. Al-Homsi’s account could not be independently verified.

Although Hezbollah’s ties to Syria have stayed strong during the uprising, the government’s longstanding relations with the Palestinian militant group Hamas have frayed.

Syria’s state-run media unleashed a scathing attack on the leader of Hamas, accusing him of turning his back on Assad and describing him as ungrateful and traitorous.

In an editorial aired Monday, Syrian TV said Khaled Mashaal, who pulled Hamas’ headquarters out of Damascus this year, had abandoned the resistance movement against Israel and the United States.

The comments show just how much ties between Hamas and the Syrian regime — once staunch allies — have disintegrated since the uprising began 18 months ago.

The regime’s verbal attack appeared to be prompted by Mashaal’s decision to take part in a major conference Sunday of Turkish Prime Minister Recep Tayyip Erdogan’s ruling party. Erdogan has been one of Assad’s sharpest critics.

Less than two years ago, Syria, Iran, Hamas and Lebanon’s militant Hezbollah group were part of what they called an “axis of resistance” against Israel and the U.S. With Hamas’ departure, they lost a major Palestinian faction that rules the Gaza Strip.

Hamas initially staked out a neutral position toward the uprising, but as the estimated 500,000 Palestinians living in Syria became increasingly outraged over the regime’s brutal crackdown on protesters, Hamas came under pressure for its cozy ties with the government, prompting the group in February to shift its stance and praise Syrians for “moving toward democracy and reform.”

Since then, most Hamas leaders have left Syria for Egypt, where their allies in the Muslim Brotherhood have taken power in elections following the uprising that toppled Hosni Mubarak. Egypt’s new Islamist president, Mohammed Morsi, has been a strong critic of Assad, calling his government an “oppressive regime.”

Mashaal himself shuttered Hamas’ Damascus offices and now spends most of his time in Qatar, the tiny Gulf country that has strongly backed the rebels battling to overthrow Assad.

In its editorial, Syrian state TV sought to remind Mashaal, who holds Jordanian citizenship, of when he was expelled from Jordan in 1999 for “illicit and harmful” activities, and how several countries refused to welcome him after he was kicked out.

“Remember when you were a refugee aboard planes. Damascus came and gave you mercy,” the station said. “No one wanted to shake your hand then, as if you had rabies.”