Draped in the red and white Tunisian flag, Mohamed Brahmi's coffin was saluted by soldiers as the cortege left his home in the Tunis neighbourhood of Ariana for El-Jellaz cemetery.
Emotions were high as supporters of Brahmi, who included members of his family, lifted the coffin to their shoulders before carrying it away under armed escort.
A military helicopter overflew the capital as a sea of flags fluttered among the crowd waiting for the funeral procession along Mohamed V Avenue, an AFP correspondent reported.
Brahmi, 58, was shot dead outside his home on Thursday with the same weapon used to gun down fellow opposition politician Chokri Belaid in February, Interior Minister Lotfi Ben Jeddou said.
Also Read
He will be buried next to the grave of Belaid, in line with a wish he had expressed before his death.
Brahmi's state funeral was being held in the absence of any representatives of the government led by the Islamist Ennahda party.
Hours before the funeral got under way, a bomb exploded near a police post in the port of Tunis today, damaging a police jeep, the interior ministry said.
The ministry said nobody was hurt.
The bombing comes a day after a general strike and an anti-government demonstration during which one person was killed.
Brahmi was an MP with the leftist and nationalist Popular Movement but on July 7 quit the party he founded, saying it had been infiltrated by Islamists.
His widow Mbarka told AFP he would be buried next to Belaid, the leftist politician assassinated in February whose funeral was attended by tens of thousands and turned into an anti-Ennahda protest.