JOHANNESBURG, AUG. 29 -- A labor federation office was bombed today, and a mining company said its guards killed two black strikers as negotiators prepared for crucial talks on ending the three-week-old mineworkers' walkout.

Despite the violence, the National Union of Mineworkers and the Chamber of Mines, which represents the six mining companies involved in the labor dispute, planned to meet Sunday after negotiations opened yesterday aimed at ending the costly, three-week-old strike.

Yesterday's seven-hour negotiating session was between the union and Anglo American Corp., the largest and hardest hit of the mining companies. Local newspapers speculated that a settlement could be at hand.

More than 44,000 strikers, mostly employes of Anglo, have been fired for defying company demands for an end to the strike. Union officials indicated that rehiring of these men was among matters discussed with Anglo.

The General Union Mining Corp. said two strikers were killed by gunfire from security officers last night in a battle at its Kinross gold mine, about 30 miles east of Johannesburg. The company said about 200 strikers painted with religiously symbolic markings and armed with machetes attacked mine staff in a hostel, drawing fire from security officers. It said 12 strikers and four staff members were wounded.

Nine miners, including supporters and opponents of the strike, have been killed since the walkout began Aug. 9. The union says more than 350 miners have been injured and 300 arrested.

Near Cape Town, an explosion severely damaged a building housing offices of the Congress of South African Trade Unions, the 750,000-member black labor federation of which the miners' union is the largest affiliate. The three-story building was officially opened last Sunday by the Rev. Allan Boesak, a prominent antiapartheid activist.

The explosion came two days after the trade union congress said it was taking steps to support the miners, possibly including a national strike. In May, during a strike by black transport workers, the headquarters of the congress was bombed, with damage so extensive that the building was condemned.

The previous negotiating session between the miners' union and the Chamber of Mines took place Tuesday. Union officials said they lowered their wage demand from 30 percent to 27 but that the chamber refused to discuss altering the 15 percent to 23.4 percent raises it began paying after prestrike negotiations broke off in mid-July.

On Tuesday, the chamber offered a slight improvement in vacation pay and a doubling of death benefits, which union members overwhelmingly rejected in voting the next day.

Anglo says 80 percent of the union's membership works in its mines. It began dismissing strikers midway through the strike and says it would continue doing so until the walkout ends.

The chamber says 210,000 workers are striking at 29 mines. According to one independent estimate, the strike is costing the country's biggest export industry at least $8 million a day in potential profits.