The private Nessma television station reported that gangs of youths were attempting to steal the cars of mourners and began throwing stones when confronted by police.
Police responded with tear gas, some of which floated into the cemetery itself. Members of the crowd tried to stop the young people from throwing rocks.
The slaying of 48-year-old lawyer Chokri Belaid has exacerbated Tunisia's long-running political crisis.
Belaid's funeral procession had not yet reached the cemetery when the clashes began.
THIS IS A BREAKING NEWS UPDATE.
AP's earlier story is below.
Tens of thousands of Tunisians chanting anti-government slogans converged Friday on a cemetery for the funeral of an assassinated leftist opposition politician as military helicopters hovered overhead and tensions threatened to boil over into further violence.
Mourners came from all over the country to mark the passing of 48-year-old lawyer Chokri Belaid, a harsh critic of the Islamist government who was gunned down in front of his house Wednesday, sparking days of rioting by his supporters. The nation was largely shut down due to a general strike called by the labor unions in solidarity.
Efforts to stem the country's worst crisis since the 2011 revolution deposed dictator Zine El Abidine Ben Ali have so far failed and the funeral has become a platform to mobilize popular anger. The anti-government sentiment at the cemetery was palpable and there was a brief scuffle when officials identified as being with the governing coalition were stopped by the crowd from entering.
The army, one of the few state institutions still holding people's respect, provided security for the funeral march and could play the role of a stabilizing force in the coming weeks.
Once the standard bearer in the region for its political consensus, the country's transition to democracy has been shaken by a sour economy and political turmoil pitting the country's governing Islamists against secular parties, sometimes violently.
Belaid had accused the ruling Islamist Ennahda party of resorting to thugs to attack opposition rallies. His family and allies accuse the party of complicity in his Wednesday killing. Although they have offered no proof, the allegations have fanned popular dissatisfaction with the government.
[to top of second column]
"We can't accept that they assassinate freedom, that they assassinate democracy
-- that's what they are doing -- we are burying a martyr," said Mohammed Souissi, a 63-year-old veterinarian who showed up at the cemetery, where the crowd seemed unfazed by the intermittent rain and sang the national anthem.
Near Belaid's parental home where the process was set to begin, opposition politicians, lawyers in black robes and white collars gathered with thousands of other mourners, chanting "stop the violence" and "we are all Chokri Belaid."
More than a dozen headquarters of the Ennahda party were attacked overnight in towns around the country, Tunisian media reported. Schools, shops, banks and other institutions were all shuttered following the general strike.
Tunisia's prime minister offered to replace the government after Belaid's killing in response to long standing opposition demands, but that attempt may have backfired as his own ruling Islamist part rejected his decision
-- exposing divisions within the party itself between moderates and hardliners.
The Ministry of the Interior put out a statement Friday urging calm, but the police force has been a major target of protesters over the past few days.
The ministry building itself on Friday morning was ringed by several lawyers of iron barriers and barbed wire extending across the city's signature Bourguiba Avenue, where it has been a focus of protests. The area was also heavily patrolled by armored police vehicles in anticipation of any violence.
Knots of young men were gathered on street corners near the avenue.
Press; By BOUAZZA BEN BOUAZZA and GREG KELLER]
Copyright 2013 The Associated
Press. All rights reserved. This material may not be published,
broadcast, rewritten or redistributed.