South Africa on Friday ended its extraordinary public exploration of apartheid's horrors, shutting down two years of hearings that laid bare decades of massacres, beatings and torture.

Testimony in the Truth and Reconciliation Commission's probe into human rights abuses was at times so graphic that the panel's chairman, retired Anglican Archbishop Desmond Tutu, buried his head in his arms and wept.The final witness was Wouter Basson, a scientist who headed a secret program to devise chemical and biological weapons aimed at blacks, one of the more sinister chapters in the annals of white minority rule.

Scientists in June testified about concocting poisoned shirts and chocolates; trying to poison Nelson Mandela, who spent 27 years as a prisoner of the white-run state before becoming its first black president; seeking bacteria that would only affect blacks; and hoarding huge stockpiles of deadly anthrax and cholera.

Seeking to implicate the United States and other countries, Basson told the commission that the West shared military secrets with him about chemical and germ warfare. In exchange, he provided information on the chemical weapons capability of Soviet-backed countries neighboring South Africa.

Dubbed "Dr. Death" by local media, Basson denied trying to kill Mandela, saying he helped protect him from a plot by radicals in the African National Congress who thought their imprisoned leader too moderate.

Basson also denied that he told his scientists to develop ways of reducing fertility among black women or researching a bacteria that would only kill black people.

Basson's testimony capped hearings in which the panel summoned up apartheid's grisly past: the death of activist Steve Biko; murders and assaults laid at the door of Nelson Mandela's ex-wife, Winnie Madikizela-Mandela; police death squads and the tor-ture of black activists.

Dozens of secret burial sites were found when former security officers led panel members through dusty fields and identified bodies in shallow graves.

One witness, police assassin Eugene De Kock, known as "Prime Evil" by his own men for his ruthlessness, testified that torture and murder by the state security forces had become commonplace.

Tutu, a Nobel laureate, was visibly disturbed by some testimony.

"I wasn't sure I was the right person for the job," he told SABC television on Friday. "I asked myself, `How did so many of us survive?' "

The panel heard from 21,000 witnesses. Now, it must write a report due in October that is designed to bring reconciliation and racial healing through a reckoning with the past. A separate committee will continue to hear amnesty applications.

The question of who gave the orders for the atrocities has dogged the commission hearings throughout.

The ultimate authority, former President P.W. Botha - the last hard-line apartheid leader - has refused to appear. But in an amnesty hearing, a former law and order minister said Botha gave the orders to bomb the building that housed the anti-apartheid South African Council of Churches. Botha has denied giving that order.