Mr. Barakat said he got the idea for the song during a trip to Syria when he heard Hezbollah fighters preparing to fight in Yabroud. He returned to Lebanon, where his friends wrote the music and lyrics and he recorded the song in his studio on the second floor of a shopping center, above a men’s formal-wear shop and a rotisserie chicken restaurant. The whole process took about a day, he said.

The resulting song curses the rebels as terrorists and “takfiris,” or extremists who consider other Muslims infidels, and calls on Hezbollah to vanquish them. The accompanying video opens with a mushroom cloud rising over Yabroud, followed by a Hezbollah flag flying over the town.

The song quickly caught the attention of antigovernment activists in Syria and abroad, who considered it sectarian incitement and passed it around. Mr. Barakat said he realized he had struck a nerve when the song quickly accumulated tens of thousands of views.

Then the calls started — facilitated by the fact that he had put his cellphone number in the video to drum up business for his other line of work: wedding singer. “I thought it would spread through the fighters and the listeners who are with us and that they would get excited to go to the front,” he said. “But I never expected all of this noise.”

Rebels soon responded in kind. Fighters from an extremist group, the Islamic State in Iraq and Syria, chanted their own version, and a singer from the Nusra Front, an affiliate of Al Qaeda, sang, “May God destroy your house, how rotten you are!” and called Hezbollah’s fighters “monkeys.”

Enraged that Mr. Ali had equated the rebels with the Israeli Army, Ibrahim al-Ahmed, a Lebanese opposition singer who lives in Saudi Arabia, recorded his own song, “Dig Your Grave in Yabroud.”

Calling the group the Party of Satan, he appeared to threaten new attacks on predominantly Shiite suburbs of Beirut, known as the Dahiya, which have been bombed repeatedly.