South Africa's industrial heartland was brought to a near standstill for the second straight day today as hundreds of thousands of workers stayed home in the biggest political strike by blacks in the country's history.

The two-day work stoppage, called by a joint committee of black political organizations and labor unions, was marked by rioting, arson and police shootings in some areas. Seventeen persons were reported killed in the two days of clashes.

This brought to 97 the number of deaths in racial unrest during the past two months. More than 500 others have been injured and about 2,000 arrested.

The strike was peaceful in black townships south of Johannesburg where more than 90 percent of workers stayed home. An estimated 85 percent of workers in townships east of Johannesburg, scene of the worst violence, and 66 percent of those in Johannesburg's main black township of Soweto, which has an estimated population of 1.5 million, also refused to work.

White managers manned the checkout counters at supermarkets in downtown Johannesburg. Several stores closed down for the two days in satellite cities along the gold-rich Witwatersrand which stretches in a narrow belt along both sides of this metropolis.

The strike was called to protest the government's heavy-handed response to attempts by the segregated township dwellers to air a range of grievances, which include their lack of political rights under the country's segregationist system called apartheid, increased rentals for their state-owned houses and what they consider to be their inferior system of segregated education.

Instead of meeting with community leaders to hear their complaints, the white authorities have taken the view that the grievances are not genuine and that the protests are the work of political troublemakers who must be quelled.

South Africa's giant state-owned oil-from-coal corporation, Sasol, announced tonight that it had fired 90 percent of its black labor force -- estimated at 6,000 workers -- for participating in the two-day protest.

In Washington, State Department spokesman John Hughes said, "We do not believe that violence holds the solution to the complex problems of South Africa.

"Rather, as President Reagan stated in his letter to Bishop (Desmond) Tutu on winning the Nobel Peace Prize last month, 'We continue to urge the South African government to engage in a meaningful dialogue with all its citizens aimed at accomplishing a peaceful transition away from apartheid.' "

No one here can recall a previous occasion when there was such a big response by black workers to a call for a general strike to make a political point.

There have been many attempts. The idea that the white government might one day be brought down by blacks withholding their labor has acquired an almost mystical place in the political philosophy of the black working class.

But economic insecurity has defeated these attempts in the past. A black man who fails to turn up for work in South Africa is likely to be fired; and the loss of his job can mean the loss of the right to remain in the city, followed by repatriation to a remote and poverty-stricken tribal "homeland." "What is happening now is quite different from anything we have experienced in the past," said Cassim Saloojee, an executive member of a large new black alliance called the United Democratic Front. He added that a new political awareness and self-confidence has developed in the black community in recent years, which is only now beginning to reveal itself. He finds it particularly significant that the strike has been supported during South Africa's deepest economic recession in 50 years, with black unemployment at record levels.

"Something has changed in the mentality of the workers," Saloojee said in an interview today. "They have become more fearless and determined to fight for their rights in a way we have not seen them do in the past.

"This has important long-term implications," Saloojee added. "The government is going to have to rethink its traditional method of dealing with black protests with a big stick, because it is not going to work any more."

One reason for the tougher attitude among black workers, Saloojee believes, is that a change in the apartheid laws six years ago allowed them to form labor unions, and a potentially powerful labor movement has emerged.

For the first time, three of the major unions, including the 150,000-member Federation of South African Trade Unions, have allied themselves with the United Democratic Front and other black groups in calling for the work stoppage in Transvaal Province.

The other labor groups which joined the strike call are the Council of Mining Unions and the Metal and Allied Workers Union. The metalworkers are particularly strong on the eastern Witwatersrand, which is thought to be one reason why the strike was so strongly supported there.

The township demonstrations have been laced with criminality since they began in early September. This has encouraged the government in its view that it is dealing with something less than genuine grievances.

"The faceless bodies which organize these campaigns implicitly acknowledge that their ventures can be launched and executed successfully only by resorting to mass criminal action," the semiofficial South African Broadcasting Corporation said in a radio commentary tonight.

The campaign organizers, for their part, accuse the police of inflaming emotions by breaking up demomonstrating groups with tear gas, rubber bullets, shotguns and leather whips. They say this causes some enraged youths to go on a rampage and that, once started, criminal elements join in the lawlessness.

The worst violence during the strike has occurred in the townships of Tembisa and Katlehong on the eastern Witwatersrand. Troops were moved into Tembisa today after youths blocked all streets with barricades made of stones, overturned automobiles and burning tires.

According to a police version, the youths stoned government buildings and buses that were taking a few nonstrikers to work and set fire to three coaches of a train they had ambushed.

The unrest has also been showing signs of spreading to eastern Cape Province, the center of the South African automobile industry.

Ford, General Motors and Volkswagen have laid off several hundred black workers from assembly plants there this week, and the men have joined students stoning buses and government buildings.