JOHANNESBURG, SEPT. 5 -- The recently ended three-week miners' strike that pitted black labor against white capital in the costliest labor action in South Africa's history inevitably has led to a national debate over who won.

"I thought we knew how tough the industry was," said Cyril Ramaphosa, the energetic leader of the 300,000-strong National Union of Mineworkers. "We didn't." The union retreated in the face of the dismissal of more than 36,000 black miners and the imminent firing of thousands more, and accepted a wage offer that it had scoffed at in the strike's first days.

Bobby Goodsell, industrial relations director of Anglo American Corp., the company hardest hit by the miners, called the strike "a real achievement of a king." The strike crippled 44 gold and coal mines, the backbone of South Africa's economy, at a cost of up to $15 million a day.

But a more important debate is certain to emerge as the miners and management head for another round of contract negotiations next year -- the question of how long white industry and white government will allow the growing militancy and politicization of black labor unions to continue.

Running parallel to that debate will be a continuation of the examination within the black trade union movement of how far it should risk its own future by playing an active role in the political struggle between South Africa's black majority and its white minority government in Pretoria.

While both the union and management took pains during the strike to stress that the walkout was essentially an economic dispute, the broad political implications of the struggle were obvious from the beginning.

To many black South African workers, capitalism and apartheid, the country's system of racial segregation, are synonymous, and labor strikes are seen merely as an extension of the struggle for power on a national political scale.

The history of South Africa's black trade unionism since the 1920s is intertwined with the black liberation struggle, beginning with the formation of the country's first mass movement of blacks, the Industrial and Commercial Workers Union, which recruited members in a campaign against apartheid.

Its successor, the South African Congress of Trade Unions, formally allied itself with the black nationalist African National Congress and then went into oblivion when the ANC was outlawed in 1960.

The spirited debate within the black labor movement over whether to form an alliance with the nationalist movement continued through the 1960s and 1970s, with union purists arguing that labor was being dragged dangerously into black politics and that politicization of the black unions would invite government crackdowns.

For their part, the nationalists argued that black workers should be concerned not only with their own economic interests, but also with liberating all South African blacks from white political domination. Economic power, they maintained, is inseparable from political power, and one could not be achieved without the other.

To an extent, the formation two years ago of the Congress of South African Trade Unions (COSATU), which with 600,000 members is the country's largest trade union federation, merged the two views of political activism. But the debate continues.

Pragmatists in black unions say that while the suppression of black political organizations and the detention of thousands of antiapartheid activists has made politicization of the trade union movement inevitable, to join openly in the spiraling social and political conflict against the government would be suicidal.

The black labor movement, they point out, has been allowed to grow only with the acquiescence of the coalition of white capital and white government, and once black unionism is perceived as a threat to the government, that acquiescence could end.

One of the remarkable aspects of the strike was the decision of the hard-line government of President Pieter W. Botha not to intervene directly, despite pressure from the right to clamp down on black unions with court injunctions, arrests and prohibitions against foreign funding.

Nick Wiehan, the chairman of a commission whose report led to the legalization of black unions in 1979, called the government's restraint "a magnificent achievement" in light of pressures to rein in the miners' union.

At the same time, Wiehan said, it is "naive and ridiculous" to expect black unions not to become politicized when even such institutions as the Dutch Reformed Church have increasingly become so.

Characterizing black unions as a "laboratory" for social change, Wiehan said, "Psychologically, they are aware of their powerful place in the economy . . . Politicization of the negotiating process may be unwelcome to some, but it is inevitable."

Ramaphosa, while refusing to acknowledge defeat in the union's acceptance of wage increases of 15 to 23 percent that management had imposed, has called the strike a "dress rehearsal for further action" in 1988, when mine contracts will come due again.

His union, he said, already has targeted 1988 as the year for digging in for more significant gains. He added, "The Chamber of Mines will have to change. If not, they will go through exactly the same experience, but worse."

That threat is not likely to have been lost in government offices in Pretoria or in the Johannesburg suites of the Chamber of Mines, an industry group. The policy of condoning a carefully regulated black trade union movement as a pressure valve for black aspirations is constantly being evaluated, and there appears to be little willingness to allow unionism to sharpen the political conflict in South Africa.

The union leadership demonstrated its tactical skill by leading at least a quarter million workers out of work and then, in a humiliating exercise for many, leading them back with little to show for their sacrifices -- all in an orderly, unified fashion.

"We weighed the possibility of having our entire membership fired and the fact that it would take us years to reorganize," a mineworkers official said. "We felt it would be best for us to order a tactical retreat and come back again next year."

The union leaders also are aware of the state's power to deal with unions that cross the line to political violence.

Hundreds of union activists have been rounded up and detained, and COSATU has accused security police of planting bombs that destroyed the foundation of its Johannesburg headquarters earlier this year.

Each side's respect for the other's capacity to deal a debilitating blow -- management's capacity to put unions out of business by mass firings and labor's capacity to shut down the country's most vital industry -- probably augurs as well as anything for the future of labor relations in South Africa.

But if the black trade union movement increasingly becomes the battleground for the achievement of political rights -- as seems certain to happen in the years ahead -- then black power and white power could be headed for the country's most serious confrontation yet.