A boisterous crowd of about 4,000 D.C. workers led by Mayor Marion Barry held the largest apartheid protest yet at the South African Embassy yesterday, marking the 17th anniversary of The Rev. Martin Luther King Jr.'s assassination with a demand for equal rights for South Africa's black majority.

The embassy demonstration, in which 58 city officials were arrested, was one of several antiapartheid actions held around the nation to commemorate the slain civil rights leader.

"We are sending our message to the South African and U.S. governments that we will not tolerate the ungodly, evil, ugly system of apartheid," said Barry, a strong supporter of the protests, whose wife Effi has been among the more than 1,800 persons arrested outside the embassy since weekday afternoon demonstrations began there Nov. 21.

D.C. officials arrested yesterday included Curtis McClinton Jr., the deputy mayor for economic development; Budget Director Betsy Reveal; Audrey Rowe, the director of the city's social services agency, and Shirley Wilson, the director of the D.C. Office of Criminal Justice. They were charged with demonstrating -- singing several choruses of "We Shall Overcome" -- within 500 feet of the embassy, a misdemeanor charge that federal authorities so far have refused to prosecute.

In addition to the arrest of 58 city employes, 13 other protesters, including the Rev. Leon Sullivan, author of a voluntary fair-employment code for businesses operating in South Africa, were arrested later in the afternoon during a separate embassy protest.

Police said yesterday's two demonstrations brought the total number of arrests at the embassy to 1,823.

The mayor, flanked by City Council Chairman David A. Clarke and Randall Robinson, coordinator of the continuing embassy demonstrations, praised protest organizers and the assembled city workers, whom he led in a booming chant of "Freedom Yes, Apartheid No." The protesters, encouraged to take annual leave to join what was billed as "D.C. Government Employees Day Against Apartheid," carried signs and formed a three-block procession on both sides of Massachusetts Avenue NW.

Barry said the U.S. demonstrations, which have resulted in the arrest of more than 2,700 protesters in 23 cities, have given South African blacks "more courage" to renew their own nonviolent civil rights protests at home.

"The South African government is going to be under seige at home and abroad until it lets its people be free," Barry said.

Yesterday's demonstration, while timed to coincide with the anniversary of King's slaying in Memphis in 1968, also was intended to increase support for proposed economic sanctions against South Africa now pending in Congress.

Opponents of economic sanctions also have said they would hurt South African blacks the most and have cited the Sullivan Principles as sufficient pressure for change in South Africa. But Sullivan, founder of Opportunities Industrialization Centers Inc., said yesterday he supports efforts to force U.S. firms to divest their holdings there.

"I am supportive of the divestiture movement," said Sullivan, who predicted that "King's dream for America and for South Africa is going to come true . . . . Apartheid will be wiped off the face of the earth."

Robinson, executive director of TransAfrica, a foreign policy lobbying group on African and Caribbean concerns, said the embassy protests will continue until South Africa's white minority begins sharing power with the country's 22 million blacks.

And as he has done nearly every day since his own embassy arrest on Nov. 21, Robinson made a special appeal to the South African government to free Nelson Mandela, a leader of South African blacks who has been in prison for more than 20 years.

Robinson equated King's civil rights leadership with Mandela's, saying, "If Martin Luther King were alive today, he would be here to demand" Mandela's release.

In other antiapartheid actions, several dozen students at the University of Massachusetts in Amherst continued what has been a four-day occupation of university offices. The students are protesting the university's South Africa investments and a proposed increase in student fees.

In Atlanta, King's widow, Coretta Scott King, led wreath-laying and religious service in her husband's honor at his grave. Atlanta Mayor Andrew Young, the Rev. Joseph Lowery, president of the Southern Christian Leadership Conference and former SCLC president Ralph Abernathy also attended.