It was one of the world's most patient and tenacious campaigns for justice. After more than 22 years, it finally ended on Sunday at a luxurious seaside villa in Senegal, when the former dictator of Chad was arrested on allegations of overseeing the murder of up to 40,000 people.

Hissène Habré, accused of systematic torture and political killings in his eight-year rule over the impoverished African nation, had been living freely in exile in a mansion in Senegal since his overthrow in 1990.

Efforts by his victims to prosecute him were stalled endlessly by legal technicalities and political obstruction, and he became a symbol of how African rulers enjoyed impunity from justice.

Story continues below advertisement

Mr. Habré, now 70, was arrested at his villa in Dakar, the capital of Senegal. Reports said he was taken into custody by paramilitary police. Senegalese officials confirmed he had been arrested, and photos showed him being led away from his mansion.

For many years, Mr. Habré had been protected by the government of former Senegal president Abdoulaye Wade, who stalled every attempt at a domestic or international prosecution.

But last year Mr. Wade was defeated in an election and the new president, Macky Sall, pledged to take action against corrupt officials who had been shielded by the previous government. He agreed last year to set up a special court in the Senegal justice system to prosecute Mr. Habré, and the court was established in February. The trial of Mr. Habré is expected to begin late next year or in early 2015.

"After 22 years, Habré's victims can finally see the light at the end of the tunnel," said Reed Brody, a lawyer at Human Rights Watch who has been helping former political prisoners and other victims since 1999.

Twelve years ago, Mr. Brody stumbled on a vast pile of documents at the abandoned headquarters of Mr. Habré's dreaded political police. The documents listed 12,321 victims of abuse, including 1,208 people who were killed or died in jail.

A commission of inquiry in Chad has estimated that Mr. Habré's government was responsible for about 40,000 politically motivated murders and about 200,000 cases of torture.

Despite the atrocities, Mr. Habré was supported by the United States and France throughout his rule. Washington had provided covert CIA paramilitary support to help him take power in a coup in 1982, and it continued to give him tens of millions of dollars in military aid during his rule.

Story continues below advertisement

After he fled to Senegal, he used millions of dollars allegedly stolen from Chad to build a network of supporters in Senegal, allowing him to evade justice, Mr. Brody said.

Former political prisoners from Chad have been pursuing justice against Mr. Habré. "We are finally going to be able to confront our tormentor and regain our dignity as human beings," said a statement on Sunday by Clément Abaifouta, president of the Association of Victims of the Crimes of Hissène Habré's Regime.

Mr. Abaifouta, a political prisoner during Mr. Habré's rule, has described how he was forced to bury hundreds of other prisoners in mass graves.