KINSHASA (Reuters) - A court in Democratic Republic of Congo sentenced a political opposition leader to five years in prison on Wednesday, a human rights advocate said, a judgment that risks imperiling multi-party talks meant to organize a presidential election next year.

The court found Franck Diongo, president of the opposition MLP party, guilty of illegally detaining three soldiers during violent protests last week in the capital Kinshasa that killed dozens, said Georges Kapiamba, a lawyer and human rights advocate who attended the trial.

Kapiamba told Reuters that Diongo was not able to defend himself because of failing health and called the decision “totally political”. The government has denied that the prosecution is politically motivated.

The verdict comes as representatives of President Joseph Kabila’s ruling coalition and the country’s main opposition bloc say they are near an accord under which Kabila would step down by the end of 2017 after an election to choose his successor.

The election was meant to take place last month but the government postponed it until at least April 2018, citing delays registering millions of voters. The opposition accuses Kabila of trying to cling to power - a charge he denies.

Dozens of opposition politicians and anti-Kabila activists have been arrested in the past year on what rights groups say are politically motivated charges and the opposition has called for some of those charges to be dropped as a show of good faith.

Earlier in the day, Felix Tshisekedi, the leader of the opposition delegation at the talks, said negotiations could break down over prosecutions against Diongo and other opposition leaders.

“We go from one provocation to the next,” Tshisekedi said in an interview broadcast on local news site actualite.cd. “If this continues, we won’t be able to sign an accord.”

Other hold-ups in the negotiations include the main opposition bloc’s insistence that one of its members be named prime minister and that the country’s electoral commission be reconstituted.

Congo’s Catholic bishops conference, which is mediating the talks, has said it hopes a deal will be signed on Friday. Western and African powers fear failure to reach a compromise could lead to a repeat of the wars between 1996 and 2003 in eastern Congo that killed millions, most from hunger and disease.