Spurred by the escalating violence in South Africa, the Baltimore City Council has approved a resolution urging withdrawal of all investments held by the city's $833 million employe pension programs from firms doing business in South Africa.

The city thus joins scores of other municipalities in the United States, including the District of Columbia, that for the last year or more have been attempting to pressure the minority white-ruled South African regime to relax its apartheid policy of racial segregation.

The unanimous biracial vote here before a standing-room-only audience in City Hall Monday night came months after the resolution was introduced and after trustees of the city's three pension funds had expressed initial concern that wholesale dumping of its South African-related investments could jeopardize the city employes' retirement programs.

After talks with key City Council members, councilman Francis X. Gallagher said today, the trustees indicated a gradual, phased divestiture and reinvestment in firms not doing business in South Africa would be feasible "without destroying the system."

City finance officials estimate that $174 million, or about 21 percent, of the $833 million in pension funds are invested with firms doing business in South Africa. The firms include IBM, General Motors, R.J. Reynolds and Goodyear Tire & Rubber, officials said.

"You name it, just about all the major corporations are involved," said Harold Tall, deputy director of finance.

Trustees for the three pension programs -- one for police and firefighters, another for other city employes and a smaller one for elected officials -- "are now sympathetic with City Council objectives," Tall said.

"The only caveat," he said, "is they have to do it divest in such a way as not to minimize the earnings of the programs . . . . You can't turn loose that much money all at once."

The resolution passed by the City Council is nonbinding and simply urges the trustees to take whatever reasonable steps they can to divest. "We really can't tell them what to do," said Gallagher.

The vote on the resolution was 17-0. Two members of the council were absent, Michael B. Mitchell, who is hospitalized, and Iris G. Reeves, who is on vacation. Both are black and were reported to favor the resolution. The council has 7 black members and 12 white members.