Uganda's opposition presidential candidate, Bobi Wine, was defiant Friday after being released on bail following violent clashes between security forces and his supporters that left at least 37 people dead, marking a violent start to the country's election season.

Two days of protests were sparked by Wine's arrest on Wednesday ahead of a political rally in the run-up to the January 14 election, in which he is seen as the main challenger to President Yoweri Museveni, who is seeking to extend his 36-year rule.

Wine, a musician-turned-politician, was charged on Friday with infringing Covid-19 restrictions on large gatherings.

Violence erupted after the arrest of opposition leader Bobi Wine, President Yoweri Museveni's main opponent in January's election
Violence erupted after the arrest of opposition leader Bobi Wine, President Yoweri Museveni's main opponent in January's election AFP / Badru KATUMBA

"I was violently arrested, tortured while in detention, threatened with death but this did not break my resolve," Wine told AFP after his release.

"I promise the people of Uganda that whatever the situation I will not abandon them on a journey we started together, we must finish it together and that's when we have removed a dictator from power," he said, referring to Museveni.

In Kampala, drivers blared their horns and radio stations played Wine's hits after news of his release came through.

Dozens died and hundreds were arrested this week as tyres were burned and police responded to hurled rocks with teargas, rubber bullets and live rounds in the capital Kampala and other towns.

Many young Ugandans see Wine as their champion in a country mired in poverty and youth unemployment
Many young Ugandans see Wine as their champion in a country mired in poverty and youth unemployment AFP / Sumy Sadurni

There was a heavy police and army presence in Kampala with roadblocks and security checks.

"We have recorded so far 37 dead bodies, those related to the protests which started Wednesday," police health director Moses Byaruhanga told AFP, adding that the victims had died of wounds and suffocation.

Addressing a press conference Friday, police spokesman Fred Enanga claimed the protests were "part of a loosely coordinated campaign" and not spontaneous.

He said that bows and arrows, as well as bottles, tyres and fuel for incendiary devices had been found.

Wine supporters take cover from tear gas shot by police at the Kampala rally
Wine supporters take cover from tear gas shot by police at the Kampala rally AFP / STRINGER

"All indicators reveal these were not just impromptu actions," he said, adding that 375 people had so far been arrested.

Wine is due to appear in court again on December 18.

Wine has become a lightning rod for opposition to Museveni
Wine has become a lightning rod for opposition to Museveni AFP / STRINGER

According to the charge sheet, seen by AFP, Wine is accused of "an act which he knew or had reason to believe was likely to spread the infection of Covid-19."

Human Rights Watch accuses Uganda of seeking to "weaponise" pandemic restrictions, using rules on gatherings to stop political rallies.

"The authorities have consistently used Covid-19 guidelines as an excuse for violent repression of the opposition rather than to safeguard the democratic playing field for free and fair elections," said Africa researcher Oryem Nyeko.

The violence has raised fears and drawn condemnation.

"The increasing spate of violence so early in the campaign season does not bode well for the weeks to come before the elections," said Nyeko.

The rights group urged security forces to "respect the rights of people to peacefully protest".

In New York, UN spokesman Stephane Dujarric this week called for Wine's release, while the US embassy in Kampala said it deplored the violence and extended its sympathy to the victims and their families.

Wine, a 38-year-old popstar, has become a lightning rod for opposition to Museveni, who is seeking a sixth term.

Many young Ugandans see Wine as their champion in a country mired in poverty and youth unemployment.

Museveni, a 76-year-old former rebel who seized power in 1986, is one of Africa's longest-serving leaders.

Wine has been repeatedly arrested, most recently on November 3 after he filed his candidacy for the elections, his concerts are routinely banned and his public rallies broken up with teargas.

However, Museveni's own rallies have gone ahead unimpeded.