Armed men on an overlooking hill in the rival neighbourhood of Jabal Mohsen - a stronghold of the Alawites, a Shia Muslim offshoot sect that is popular in Syria - opened fire, as mourners tried to escape from the area.
There was automatic rifle fire and at least two grenades were thrown during the battle. Two people were wounded, police said.
Thousands had packed the streets of the northern city of Tripoli, Lebanon's second largest city, for the funeral of Bilal Hayek. "Sunni blood is boiling," chanted the mourners, some of them armed.
Shops quickly closed and people fled indoors to seek safety before the shooting died down half an hour later.
The Hezbollah-led opposition launched a country-wide strike on Tuesday which shut down much of Lebanon and sparked violence in which three people were killed and 176 wounded.
The opposition wants veto power in government and early parliamentary elections to topple the cabinet of Fuad Siniora, the Lebanese prime minister.