LONDON — The head of Hezbollah, the Lebanese Shiite militant group whose armed followers are fighting in Syria on the side of President Bashar al-Assad, pledged on Thursday that his forces would remain there as long as necessary.

The leader, Hassan Nasrallah, spoke at a Shiite ceremony in his stronghold in southern Beirut, the Lebanese capital, held to observe Ashura, one of the most important holidays on the Shiite religious calendar. It commemorates the killing of Imam Hussein, a grandson of the Prophet Muhammad.

Mr. Nasrallah’s battle-hardened fighters joined the fray in Syria earlier this year to recapture a border town, and Mr. Assad’s foes say they have also been deployed on other fronts in the south near Damascus, the capital, and Aleppo in the north.

“As long as the reasons remain, our presence there will remain,” Mr. Nasrallah told thousands of his followers.