Five militants who were freed Wednesday as part of a prisoner swap between Israel and Hezbollah, on Thursday prayed at a slain Hezbollah military commander's grave, pledging to follow in his footsteps and continue fighting Israel.

Wearing military fatigues, the five men walked down a red carpet laid out for them outside Imad Mughniyeh's burial spot at a cemetery south of Beirut.

They laid wreaths and gave a military salute as supporters showered them with rice.

Mughniyeh, the second in command of the Lebanon-based guerilla organization Hezbollah, has been accused of masterminding terrorist bombings in the 1980s and 1990s. He was killed in a car bomb in neighboring Syria in February.

Hezbollah and its supporters regard him as a hero of almost mythical stature. The militant group dubbed Wednesday's prisoner exchange Radwan in reference to Mughniyeh's nom de guerre, Hajj Radwan.

"We swear by God to continue on your same path and not to retreat until we achieve the same stature that God bestowed on you," said Samir Kuntar, who had been the longest-held Lebanese prisoner in Israel until his release on Wednesday. Kuntar was convicted of murdering three Israelis in a 1979 terror attack in Nahariya.

Kuntar referred to Mughniyeh's martyrdom, saying "this is our great wish. We envy you and we will achieve it," God willing.

Kuntar and four Hezbollah guerrillas were freed in exchange for the bodies of two Israel Defense Forces reservists captured by Hezbollah in July 2006 in a cross-border raid that sparked the Second Lebanon War.

The exchange was mediated over the course of 18 months by a United Nations-appointed German official.

Later in the day, hundreds of people welcomed Kuntar in his hometown of Abey, a mountain hamlet 10 miles (16 kilometers) south of Beirut.

"This time yesterday I was in the hands of the enemy. But at this moment, I am yearning more than before to confront them," Kuntar said. "Hezbollah's weapons are a red line that no one should be allowed to cross," he told reporters.

Israel also returned to Lebanon the bodies of nearly 200 Lebanese and Palestinian fighters who were killed fighting Israel over the past three decades.