Private security guards opened fire with rubber bullets and tear gas at black mineworkers at one gold mine today and police made 21 arrests at another as workers began a walkout that could exacerbate unrest in South Africa.

Two white men were killed and two others badly injured last night by a crowd returning from a mass funeral outside the port city of East London. The victims were only the third and fourth whites to die in a year of political violence that has claimed the lives of about 675 blacks.

The mineworkers started their strike tonight with the 8 p.m. shift at five gold and two coal mines owned by three firms. Earlier in the day, workers attempting to hold a meeting at a gold mine unaffected by the strike clashed with security guards.

Seven mineworkers received minor injuries when guards opened fire at the Beatrix gold mine in Orange Free State, according to Susan van Rensburg, a spokeswoman for Gencor, which owns the mine and has three others that are affected by the strike. She said a crowd of about 1,000 workers had gathered "in an unruly manner" on company property outside the dormitories where workers are housed and had refused to disperse.

Security guards used tear gas to scatter most of the crowd, but a small group remained and attacked a security vehicle, after which the guards opened fire with rubber bullets, van Rensburg said.

The National Union of Mineworkers issued a statement saying that its members had been meeting peacefully to discuss the strike when company officials told them that they would be forced to work at gunpoint if they walked out in sympathy with the other miners. A Gencor official dismissed the union's account as "absolute rubbish."

Police were called in tonight at the Kloof gold mine west of Johannesburg to quell a disturbance that a spokesman for Gold Fields, owner of the mine, said began when about 300 workers set up picket lines on company property outside the racially segregated dormitories.

He said police and guards asked the men to disperse, which most did. The 21 who refused were arrested for "public disturbance," and two workers were injured slightly in "infighting at the hostel grounds," the spokesman said.

Otherwise, spokesmen for the three companies reported that night shifts were proceeding normally.

There was no independent confirmation of either the company's or the union's account of today's incidents. The three companies affected by the strike have closed their property to journalists.

The real test of strength begins at 6 a.m. Monday, when most workers are due back to the mines after a weekend off.

The striking union, South Africa's largest black labor organization, says 70,000 blacks will walk off the job following last week's breakdown of talks over wage demands. The companies contend that the union has only about 12,300 members at the seven mines and that most do not support a walkout.

In either case, the number affected is only a fraction of the 550,000 blacks employed in South Africa's major gold and coal mines owned by the six companies that the Chamber of Mines comprises. But there are fears here that violence at any of the struck mines could trigger a general miners' walkout and a new round of political unrest even among the three companies that have settled with the union. Last year 10 miners died during a brief walkout at two mines.

South African labor law recognizes the right of workers to organize but offers strikers no protection from dismissal. Under their contracts, workers on the mines can be fired on 24 hours' notice and sent back to their homes.

The union settled last week with the three other chamber members, which made revised wage offers. But two of the strike-affected companies offered only an increase in vacation allowances, and a third, Gencor, offered no increase at all.

Whites generally have been immune from injury during the past year of political unrest because the black townships where most incidents occur are far removed from South Africa's all-white cities. But the four whites attacked last night reportedly were taking a newly repaired car for a test drive when they found themselves in the wrong place at the wrong time.

They were driving after dark on Swart Road -- literally "Black Road" -- which links the black township of Duncan Village outside East London to a larger township in the black "homeland" of Ciskei when they came upon a crowd of black mourners walking home from Duncan Village. About 70,000 persons had attended a mass funeral there for 18 black victims of violence yesterday afternoon.

The four were attacked with knives, and their car was set on fire, police reported. One man died of stab wounds and a second was burned to death in the car. The two others were hospitalized.

Police gave no explanation for the attack and did not allow journalists to interview the two survivors. Some speakers at the funeral, one of the largest political gatherings in recent South African history, had exhorted the crowd with bitter and emotional attacks on white-minority rule. One had entreated listeners to "burn this town," adding, "We are going to burn this whole country."

Only two other whites have died in violence by blacks. A 3-week-old baby was struck by a rock in the back seat of his mother's car while she was driving a domestic servant home last year in the black township of Sebokeng, south of Johannesburg, and a woman was stoned to death by a mob that attacked her car near the township of Duduza, east of Johannesburg, earlier this year.