Syrian rebels have repeatedly accused Tehran of sending fighters to help Assad crush the 22-month-old uprising, a charge Iran has denied.
The Iranian embassy in Lebanon said the dead man, Hessam Khoshnevis, was in charge of Tehran's reconstruction assistance in Lebanon. It said he was killed by "armed terrorist groups," a label used by the Syrian government to describe Assad's foes, on the road to Lebanon as he returned from Damascus.
A Syrian opposition commander said the attack was carried out by rebel fighters near the Syrian town of Zabadani close to the Lebanese border.
Iran has strongly backed Assad during the uprising in which the United Nations says nearly 70,000 people have been killed. In September Iran's Revolutionary Guards commander-in-chief said the force was providing non-military support in Syria and may get involved militarily if there is foreign intervention.
Last year Syrian rebels kidnapped 48 Iranians who they said were Revolutionary Guard fighters and authorities in Tehran described as pilgrims. They released them this year in a prisoner swap with Syrian authorities.
Forty eight hours after his death no rebel brigade had claimed responsibility.
"He served the oppressed, supporting the resistance to Israel," Iran's ambassador to Beirut Ghazanfar Roknabadi told reporters as he received condolences from senior Lebanese officials. "Assassinating this dear martyr is a clear sign that the Zionist enemy does not accept his successful work".
In Tehran, a funeral service was held for Khoshnevis on Thursday, Iran's semi-official Fars news agency reported, attended by senior Revolutionary Guards commanders.
Tehran backs Assad
Tehran's IRNA news agency said Khoshnevis, identified in some reports as commander Hassan Shateri, was a military engineer during the 1980-88 conflict between Iran and Iraq, and later operated in Afghanistan.
But officials stressed Khoshnevis was engaged in civilian reconstruction in Lebanon for the last seven years and Lebanon's Al Safir newspaper said had been in Syria to study reconstruction plans for the northern city of Aleppo.
Whole districts of Aleppo, Syria's largest city, and other urban centres across the country, have been destroyed in months of entrenched urban warfare. Assad has used air strikes and artillery to push back rebels, who have become increasingly well-armed as the conflict approaches its third year.
The Iranian Revolutionary Guards public relations office said Khoshnevis would be buried in his home town of Semnan after being "martyred on his way from Damascus to Beirut by mercenaries."
(Additional reporting by Zahra Hosseinian; editing by Janet McBride)