In what has been called “Africa’s trial of the century”, the former dictator of Chad has been found guilty in connection with a reign of terror involving rape, torture and mass murder.

Hissène Habré was once backed by America’s Cold War-era CIA, but in a landmark for African justice, a specially convened court has sentenced him to life imprisonment for crimes against humanity, rape, sexual slavery and ordering killings.

The trial, the first time an African Union-backed court has tried a former ruler for human rights abuses, heard that Habré had presided over a regime where opponents were tortured using electric shocks and waterboarding, and women were kept as “sexual slaves”. The ex-dictator has also become the first former head of state to be convicted of personally raping someone.

One estimate suggested that under the direct control of Habré, Chad’s Directorate of Documentation and Security (DDS) killed at least 40,000 civilians – in a country of 7 million people – and tortured hundreds of thousands more.

Habré, 73, who had ruled Chad between 1982 and 1990, had protested his innocence and dismissed the legitimacy of the trial. But Judge Gberdao Gustave Kam delivered a guilty verdict at the Extraordinary African Chambers convened in the neighbouring country of Senegal.

Praising the victims of Habré who were instrumental in bringing the former dictator to justice, Reed Brody, legal counsel for Human Rights Watch, said: “Today will be carved into history as the day that a band of unrelenting survivors brought their despot to justice.”

“For many years,” he added, “The common refrain was that they would never succeed. But they pressed forward. In a case which looked dead so many times, the victims made it clear that they would never go away.”

The 26-year campaign to bring Habré to justice had led to him being described as “Africa’s Pinochet”.

While the arrest of the former Chilean dictator in London in 1998 had been a process led by the developed world in the form of a Spanish magistrate issuing an international arrest warrant, Habré was tried in Africa, with much of the campaign against him led by his African victims.

On the eve of Habré's trial in July last year, Mr Brody told The Independent: “This is the case that shows it is possible for African victims to bring African dictators to justice in Africa. It doesn’t show it will be easy. It doesn’t show it will be quick. But it does show that dictators who commit atrocities will never be fully out of the reach of justice.”

Mr Brody added that because of the Habré trial, he had been approached by the victims of other African dictators about the possibility of bringing them to trial.

The Habré case is also thought to have been the first in the world in which the courts of one country prosecute the former ruler of another for alleged human rights crimes.

The trial had begun with Habré having to be dragged into court by a policeman, kicking and screaming that the judges were “valets of America”. The accusation had a certain irony given that Habré had reportedly been propped up by the Reagan-era CIA, which viewed him as “the quintessential desert warrior” and a useful bulwark against Libya’s Colonel Gaddafi.

When Habré eventually fell silent, he was forced to sit through weeks of testimony detailing what he had done to his own people.

The court heard how victims were tortured in an underground prison, suffering electric shocks, waterboarding and asphyxiation. Some said women were kept as sex slaves and others spoke of having spice rubbed into their genitals.

The trial also heard from members of forensic teams that had discovered mass graves, and a handwriting expert who identified Habré’s writing on police documents. A former DDS agent claimed the director of police had visited Habré every day with documents for the dictator to sign.

Among the witnesses for the prosecution was Souleymane Guengueng, an accountant who had vowed to bring Habré to justice after nearly dying in one of the dictator’s jails. After being released following the 1990 coup which saw General Idriss Déby seize power, Mr Guengueng started collecting testimony from his fellow former prisoners.

This proved a dangerous task, because despite the coup, many of Habré’s henchmen remained in positions of power in Chad. Mr Guengueng told The Independent that his car had been tailed and masked men had threatened him.

“My friends told me I was mad,” he said. “But I couldn’t stop.”

Others involved in the trial took similar risks. Jacqueline Moudeina, the lawyer who represented victims, still has shrapnel in her leg from a 2001 grenade attack that was allegedly ordered by one of Habré’s former security chiefs, who was still a figure of authority in Chad despite the 1990 coup.

The Chadian victims were assisted by Mr Brody, a man who has acquired the nickname “the dictator hunter”. In 2001 he and his colleagues stumbled upon piles of dust-covered documents in the abandoned headquarters of the DDS, comprising prisoner lists, interrogation reports, and 1,265 direct communications to Habré himself about the status of 898 detainees. Mr Brody called it “the smoking gun.”

Mr Guengueng and his team spent six months photocopying every document. After the verdict against Habré was delivered, he said: “I feel 10 times bigger now than Hissène Habré.”

It is expected that Habré will serve his life sentence in Senegal, where he had been living in comfortable exile after being deposed by the coup in 1990. His defence has about 15 days to appeal.