In a display of strength that has rattled the government of President Pieter W. Botha, a wildly cheering crowd of about 3,000 militant right-wing white Afrikaners, waving flags similar to the Nazi swastika, seized control of a hall in this northern city tonight and forced the governing party to abandon a major rally.

Amid scenes of unprecedented violence between more moderate and far-right factions of the once solidly united Afrikaners who dominate South Africa's politics, scores of burly men joined in a bloody fistfight for control of the stage.

Police later fired tear gas into the hall to disperse triumphant members of the right-wing Afrikaner Resistance Movement, sending the choking crowd stampeding for the doors. Some people hurled themselves through glass windows to escape.

More tear gas was fired as the angry militants reassembled outside the hall yelling abuse at Afrikaner policemen wearing gas masks, whom they accused of ethnic treachery.

"You won't stamp out the black troublemakers properly but you do this to your own people," one man was heard to shout above a storm of abuse that was hurled at the police.

Several people injured in the brawl were treated in two emergency ambulances parked near the hall.

Foreign Minister R.F. (Pik) Botha had been scheduled to address what was planned as a major rally of the ruling National Party. Botha did not enter the hall.

Two hours before Botha was due to speak, more than 1,000 right-wing supporters were gathered in a singing, chanting crowd outside the hall. National Party marshals had locked the doors to keep them out and 30 marshals waited inside, standing guard on the stage.

As the crowd swelled, some members broke open a side door and with a key apparently provided by a sympathetic official unlocked the main doors from inside.

The mob swept in and charged the platform. For 10 minutes a battle raged as the National Party marshals tried to fight off the invaders. Fists, chairs and tables flew. People were flung bodily from the stage, some crushing metal tables as they fell on them.

For the next two hours the triumphant right-wing supporters cheered, stamped and shouted slogans in a frenzy of excitement.

National Party supporters gradually melted away, returning disconsolately to their party offices. "I am shocked. This is barbaric. We can't let the minister come here; his life would be in danger," remarked a member of Botha's staff as he watched the pandemonium in the hall.

The triumph tonight of the white right-wing militants underscored the government's concern at their growing resistance to its cautious changes and the continuing insurrection in the black townships.

Many observers here suspect that South Africa's military raids on alleged black guerrilla bases in three neighboring African states on Monday were primarily intended as a domestic political gesture in response to this right-wing threat.

Governmental concern has been mounting in recent weeks with evidence that the reaction has suddenly burgeoned.

The demonstration of right-wing strength also gave weight to Pretoria's argument to foreign critics that it cannot change its apartheid system of segregation faster because to do so might provoke too much resistance from its traditional Afrikaner supporters.

"We have been trying for a long time to tell western governments about the trouble we are having with our right wing. Tonight you have seen what we are talking about," Botha told foreign correspondents in a brief interview after abandoning the rally.

In an address to several hundred supporters who gathered at the National Party's local offices later this evening, Botha pledged that the government would continue with its reform program despite the growth of right-wing opposition.

"Nothing that happened here tonight will stop the government from walking the road of reform we have said we would walk. We are irrevocably committed to the road of reform," Botha told the cheering, loyal crowd.

But, Botha added, in doing this the government is determined to crack down on violent elements of both the left and the right.

The movement is blatantly Nazi in both its symbols and its ideology. Its insignia is a slightly modified black swastika set in a white circle on a red background. It uses a Nazi-type salute and has a brigade of "storm troopers" who wear brown uniforms with high boots.

Botha equated the right-wing movement, which organized tonight's seizure of the meeting hall, with the African National Congress, the main black underground movement, saying its emergence was a reaction to the ANC's use of guerrilla violence in its attempts to overthrow the apartheid system.

Botha criticized western governments for their failure to condemn the ANC's commitment to violence, which he said was the source of what was now becoming a spiral of violence in South Africa.

Meanwhile, in Parliament in Cape Town today the government announced two new bills giving effect to its policy of cracking down on dissenters while pressing ahead with its changes, which some critics say are designed to reformulate rather than dismantle apartheid.

One bill would extend the time limit on police detentions without charges, now two weeks, to six months. Legal specialists said it was intended to replace detention powers declared invalid by the country's Appeal Court two months ago.

The other bill, which will be presented to the Parliament on Friday, provides for a multiracial statutory council to work out a new constitution that will give blacks a greater voice in running the country.

Announcing details of the bill today, Constitutional Affairs Minister Chris Heunis said the new council also would advise the president in the meantime and so enable blacks to participate in government at the executive level.

The council would consist of the leaders of six black tribal "homelands," 10 urban black representatives, an undisclosed number of white Cabinet ministers, the leaders of the newly established colored (mixed race) and Asian chambers of Parliament, and 10 other persons selected by President Botha. The president will be chairman.

Initial reactions tonight indicated that few if any black nationalist leaders would be prepared to serve on the council, indicating that its establishment would do little to defuse the continuing unrest in the black community.