Police arrested the Rev. Allan Boesak, president of the World Alliance of Reformed Churches and a mixed-race opponent of apartheid, after he defied an order today not to enter a black area near Cape Town to attend a political funeral. He later was released on bail.

Here in Durban, at the historic Mohandas K. Gandhi settlement, a health and education center between the Indian and black communities, looters completed destruction begun yesterday. Indian vigilantes had clashed with a mob of black rioters, who set ablaze the settlement where the Hindu leader once practiced his philosophy of passive resistance.

Gandhi's civil disobedience tactics were used today near Cape Town, where Boesak, who is a minister of the Dutch Reformed Church, and 18 other clergymen and student leaders defied a police order sealing off the black township of Guguletu. Boesak's group had been on its way to officiate at the funeral of a 17-year-old youth killed July 29.

The protesters, arms linked, marched toward a police roadblock, then knelt in prayer as they were arrested. They were taken to a nearby police station, charged with illegal entry and released on $50 bail each.

Police said they feared that Boesak's presence could incite violence at the funeral. After the ceremony, police wielding batons charged mourners who had been ordered to disperse. A hand grenade was thrown from the crowd, wounding six policemen and a free-lance CBS sound technician.

Meanwhile, roving bands of club-wielding Zulu vigilantes enforced an uneasy peace in riot-torn black townships here. At least 54 persons have died in violence that included interracial clashes between blacks and neighboring Indians.

No new deaths were added to the toll today. Police said their count for the previous five days included 36 blacks killed in police action and 17 hacked and mutilated in black factional violence. At least one Indian also died.

Armed Indian vigilantes still patrolled the streets of the Indian community of Phoenix to ward off possible attacks from blacks in nearby areas. Security forces put on a show of strength, parading nearly 30 armored vehicles through the streets of the townships, in an apparent response to Indian accusations that the white-minority government had not given them adequate protection.

But the real enforcers today were hundreds of supporters of Zulu Chief Gatsha Buthelezi. Armed with clubs known as knobkerries, machetes, sticks and shields, and chanting Zulu war cries, they took over the bleak, unpaved streets of KwaMashu and Inanda townships. Witnesses said the mobs had assaulted youths suspected of looting or of being followers of the rival United Democratic Front, Buthelezi's chief organized opposition in the black community here.

One witness, Douglas Mzobe, a supporter of the front, said he counted 45 persons who had been stabbed or clubbed yesterday afternoon by mobs consisting of members of Buthelezi's Inkatha movement. He said some were injured while others clearly were dead.

"They were searching the houses looking for kids," said Mzobe. "If you were on the road they started stabbing you."

An Inkatha mob also assaulted a prominent Methodist minister linked to the front, according to witnesses. They said the clergyman, the Rev. Wesley Mabuza, was forced to march down a road chanting antifront slogans.

Rioters cleared out of the streets and for the first time in five days, journalists were able to move around the townships. They saw the charred and plundered remains of dozens of Indian shops and houses. Some black-owned shops had been burned as well. Many had "Usuthu," a Zulu war spirit, scrawled on walls still standing.

Township residents could be seen stripping wood and tin roofing from the skeletons of buildings. Elsewhere, hundreds lined up patiently to pump free water and kerosene into plastic jugs in front of plundered stores owned by Indians.

Residents from the nearby black township dismantled the tin-sided house where Gandhi had lived and worked during his years as a lawyer and civil rights leader here. They carted the materials to their homes, one youngster pushing a corroded wheelbarrow that contained a broken typewriter.

"We're just picking what is left," said a woman as she sorted through the debris of the 1903 building that housed the presses of the Indian Opinion newspaper that Gandhi had founded. Indians had been brought to South Africa in the last century as indentured servants. Gandhi returned to India in 1915 to lead a nonviolent campaign for that country's independence.

At the library and museum, where books, artifacts and shattered glass littered the floor, a sign on the wall cited one of Gandhi's favorite mottoes: "Where there is love, there is life. Hatred leads to destruction."

Two opposition white politicians, Molly Blackburn and Diana Bishop, were arrested for violating a new police ban on entry into the eastern Cape township outside Fort Beaufort. They were released on bail.

Police also reported arresting 106 persons in the past few days under the sweeping emergency decree announced three weeks ago to quell unrest. That brings to 1,605 the number of detainees under the emergency, more than one-third of whom have since been released.

Meanwhile, Foreign Minister Roelof F. (Pik) Botha denied that the unconditional release of imprisoned black nationalist Nelson Mandela was part of a new package of measures his government was contemplating.

Returning from discussions with U.S. officials in Vienna, Botha told a press conference that some members of his government supported the release of Mandela, 67, a principal leader of the black resistance movement. But Botha said Mandela's refusal to renounce violence as a condition for his release after 22 years in prison created "a dilemma" for the government. He said Mandela held the key to his own release.

Botha said he discussed policy changes with the Americans, and "I got the impression they were well satisfied with what I had to tell them.