Chad's former President Hissene Habre will be tried in Senegal over alleged human rights abuses committed during his eight years in office.
Hissene Habre's regime is accused of widespread murder and torture
Senegal's Abdoulaye Wade made the announcement at an African Union summit in the Gambian capital, Banjul.
Belgium has also charged Mr Habre but Mr Wade agreed with the AU that Africa should dispense its own justice.
Mr Habre fled to Senegal in 1990 and denies knowledge of the alleged murder and torture of political opponents.
He ruled Chad for eight years before being deposed in 1990 in an uprising led by current President Idriss Deby.
Earlier attempts to prosecute him in Senegal have been hampered by judicial rulings preventing him from being tried there.
In the absence of any prosecution, Belgium moved to try Mr Habre under its human rights laws, which allow nationals of any country to face charges within Belgium.
Eventually, Senegal referred the case to the AU to decide where to try Mr Habre.
The United Nations also pressured Senegal, issuing a 90-day deadline in May for Dakar to agree to a trial on its soil.
"Africans must be judged in Africa, that's why I refused to extradite Hissene Habre to Belgium," Mr Wade said, confirming his decision at the AU summit.
"We thought Senegal was the country best placed to try him and I think we must not flee from our responsibility."
He suggested that a special court would be set up in Senegal to handle the case with a wider African jurisdiction, and in co-operation with Chad's current authorities.
Those campaigning for Mr Habre's prosecution welcomed Senegal's decision.
"It's a great day for justice in Africa, because the continent's leaders have shown that no-one, not even an ex-president, can escape the law," said Reed Brody of Human Rights Watch.
Victims' representatives were pleased by the move, but injected a note of caution.
"After fighting for justice for 16 years, it looks as if we may get our day in court," said Ismael Hachim Abdallah, president of the Chadian Association of Victims of Crime and Political Repression.
"But survivors of Habre's regime are dying, and we can't wait forever. Senegal has betrayed us twice and we aren't taking anything for granted."