Cyril Harris, who has died of cancer aged 68, was called the conscience of South African Jewry because, as chief rabbi from 1987 to 2004, he stood up against his community's passive acceptance of apartheid. People who had known him as a minister in London would have expected nothing less.

From the moment he arrived in Johannesburg, after being in the pulpit of the fashionable St John's Wood synagogue in London, Harris set the cats among the communal pigeons. In his induction address, he castigated his new flock for its acceptance of a regime he felt to be abhorrent. It was time, he said, that they began accepting the fact that Jewish tradition was opposed to any form of racial discrimination - it was simply unacceptable in a people who had suffered so much themselves.

The shockwaves were felt from Cape Town to Johannesburg, where, said Harris, the people had been, at best, too passive about apartheid. Almost immediately a strong undercurrent of support was evident.

Most surprising of all, his strictures helped to create a strong relationship between South African Jews and the black establishment. Harris became a close friend of Nelson Mandela, who described him as offering the "white hand of friendship". Harris also helped in bridging the gaps between the majority population and white people in general.

When Mandela tried, unsuccessfully, to get the International Olympic Committee to agree to bring the 2000 games to Cape Town, he got Harris to use his influence to see his ambitions realised. That attempt failed, but his efforts endeared Harris to Mandela, who asked him to officiate at his second wedding ceremony; since it was held on the Jewish sabbath, Harris was unable to oblige, but he went to the president's house the day before to offer his blessings. Later, President Thabo Mbeki established equally strong relations with him.

Strangely, that hand of friendship had also been offered - and accepted - by two apartheid-era white leaders, PW Botha, the premier from 1978 to 1984, and FW de Klerk, the last white state president. Both invited Harris to tea and asked him to help them bridge the gap between black and white. Perversely, the Afrikaaner-dominated Nationalist party had, between bouts of rampant anti-semitism, shown a degree of respect for the Old Testament-abiding Jews. They regarded the community - more than 100,000 strong at the time, mostly made up of third generation South Africans of Lithuanian Jewish stock - as the "tribe in between" and, as such, uniquely able to see both sides of the issue.

All this was a long way from the smalltime businessman's family into which Harris was born in Glasgow. His grandfather had been a rabbi, but his father had contented himself with observing Jewish law and ritual as a layman, and acting as chairman of a local synagogue. The young Harris was active in youth work, particularly in the modern orthodox B'nai Akiva Zionist movement. It was as a result of that background that he decided to study at Britain's principal Jewish theological seminary, Jews College, in London.

His first ministry was at the then newly-opened Kenton synagogue, in north-west London, in 1958. He had not yet qualified as a rabbi, but the 22-year-old made an instant impact as a preacher who seemed to owe a considerable debt to the spellbinding nonconformist Christian clergy of his home country. He developed a habit (which he never lost) of walking round the steps of the pulpit, rather than confining himself to the podium itself.

Harris stayed in Kenton for more than 13 years, in which time his synagogue's membership rose from fewer than 100 families to more than 1,200. By that time, he had received his rabbinical diploma, but decided that it was opportune for a break. In 1972, he became director of London's Hillel Foundation - set up to provide facilities for students - effectively taking on the role of Anglo-Jewry's principal youth leader. Four years later, he was back in a synagogue pulpit, at Edgware, again in north-west London. It was not, however, a happy time; a former minister was constantly looking over his shoulder and trying, Harris thought, to belittle his abilities. He left after three years.

It was then that Harris went to St John's Wood, honing his skills as a preacher and pastor, and achieving a national reputation. He frequently broadcast, and became senior Jewish chaplain to the armed forces, with the rank of lieutenant colonel. It seemed only a matter of time before he became chief rabbi; indeed, he had the backing of the then chief rabbi, Lord Jakobovits (obituary, November 1 1999).

When Harris was appointed Chief Rabbi of South Africa in 1987, it appeared to be yet another step on the way for a man who could not go wrong - apart from occasional outbursts of a somewhat fiery temper. But in 1990 he was pipped to the post of Britain's chief rabbi by Dr Jonathan Sacks, who had superior academic qualifications and was a published philosopher and academic. He did not, however, have Harris's pastoral experience - or, many would say, his personal charm.

In the event, Britain's loss was South Africa's gain. The community took to Harris and to his almost fanatical love of cricket (and to his wife, Ann, an almost equally fanatical Manchester United supporter). After completing his five-year contract, he was asked to stay on. He put his new community on the national map and, for the first time, offered an official Jewish view, and action, on the problems of apartheid.

Jews had been prominent in the anti-apartheid movement, with people like Helen Suzman, Helen Joseph and Joe Slovo among its leaders. But Harris's predecessor as chief rabbi, and the community's lay leadership, had played down any role they may have seen for Jews. In contrast, in his induction address, Harris told his congregation: "The members of the Jewish community are urged to exemplify Jewish values in their relationships with the underprivileged sections of the society in which we live."

As he later said: "People were in shock. They didn't want to rock the boat. But the young members of the community, who had come to demonstrate against me, immediately came to my aid."

A year after he arrived, he founded the organisation Tikun, Hebrew for "repairing" - in this case, repairing relations with the black community. Ann, a solicitor, set up legal clinics in the townships. Dentists came to run dental centres. Harris organised a black kibbutz outside Johannesburg. A soup kitchen was opened. Street people were issued with rainwear supplied by Jewish manufacturers. Lessons were organised in needlework and woodwork, in addition to literacy classes. Jewish housewives were urged to buy an extra tin when they went to the supermarket and leave it in their local synagogue's mitzvah (or "good deed") bin, for the black poor.

At the end of last year, ill-health forced Harris to retire. He was made an OBE earlier this year. In 2003, he had been awarded the Jerusalem Prize for services to the Jewish people. The international jurist Justice Richard Goldstone described him as "the conscience of the Jewish community".

Harris and his wife, whom he married in 1960, had two sons, one a London rabbi, the other a theatrical producer.