Black activists opened fire today on police and troops for the first time in Soweto, the sprawling township outside Johannesburg that is South Africa's biggest, most volatile black urban center, police said.

The action took place as press and opposition sources protested a sweeping new decree prohibiting local and foreign reporters from filming and recording unrest, protests or security force action in the country's most troubled areas.

As a result of the new restrictions, there were no reporters in Soweto today to witness what appear to have been two gunfights between activists and security forces.

The only information available about the clashes, in which activists allegedly fired first at a police vehicle and then at an Army patrol in the township, came from an official police announcement tonight that gave few details.

According to the announcement, a group of activists fired a number of shots at a police vehicle in Soweto this morning. The police returned the fire, but there were no casualties on either side, the announcement said.

It said that later in the day three shots were fired "out of a group of illegal gatherings" at a military patrol. The announcement added that there were 61 arrests. It gave no further details, except to say that the ages of those arrested ranged from 14 to 30.

There has been a steady increase in incidents of blacks shooting back at police during the past two weeks. It began in the mixed-race, or Colored, townships around Cape Town on Oct. 17, after police clashed with members of the small Moslem community. At least two policemen were injured in subsequent Cape Town shootings.

Last Sunday the shooting spread beyond Cape Town for the first time when black rioters opened fire on police in the small central Cape Province town of Beaufort West, wounding two policemen.

Its extension now to Soweto is potentially serious. The township, with an estimated population of nearly 2 million, is traditionally South Africa's most volatile black center, and it has a considerable arsenal of illegal weapons in the hands of underworld gangs.

It is regarded as something of a mystery that major violence has not erupted in Soweto during the wave of unrest that has swept through most other parts of South Africa during the past 15 months, but there have been indications lately of mounting tension there, with a growing number of isolated clashes.

Police reported two more of these clashes today, apart from the shoot-outs. In both, small groups of blacks allegedly attacked the police with stones.

Press and opposition political sources reacted with anger today at the new censorship restrictions, which ban all television, radio and photographic news coverage of black unrest in the country's 38 designated emergency areas.

The decree also requires print reporters to obtain permission from local police before entering emergency areas, and authorizes the police to supervise their movements.

Journalists violating the new rules will be subject to immediate arrest and indefinite detention without charges or access to an attorney. If they are tried and convicted of violating the rules, they could receive up to a 10-year prison sentence and a $4,000 fine.

The decree, which was promulgated formally today but communicated to journalists yesterday, was issued by Law and Order Minister Louis le Grange, who said in an accompanying statement that "while the government has no intention of curtailing the right of the public to be informed of current events," it had decided to curb the presence of television and other camera crews in unrest areas because they "proved to be a catalyst to further violence."

The decree follows a government campaign, supported by some local newspapers, accusing the foreign media of provoking violence and of sending distorted reports abroad.

Saying it was absurd to hold a small group of journalists responsible for the profound political conflict that has been going on for more than a year, the local Foreign Correspondents Association said in a statement today that the real purpose of the restrictions was "to prevent news of South Africa's social conflict from reaching the outside world."

Ntatho Motlana, chairman of the Soweto Civic Association and widely regarded as the township's major leader, described the restrictions as an attempt to conceal police brutality and to deceive the world that order was being restored.

"Having seen examples of police brutality in the townships, I am not surprised that the government wants to keep it off the television screens of the world," Motlana added.

David Dalling, spokesman on media affairs for the opposition Progressive Federal Party, described the regulations as "press terrorism," saying the government's notion was "kill the messenger and you've somehow solved the problem when in fact all you've done is to delay the explosion."

Dalling added that South Africa now risked being categorized with the Soviet Union and other communist countries that place severe curbs on the press.

News services added the following:

In London, Britain summoned the number two official in the South African Embassy to the Foreign Office to register displeasure over the media curbs.

The editor in chief of United Press International and the presidents of CBS News and ABC News sent protests to President Pieter W. Botha.

In a telex, Maxwell McCrohon of UPI said: "United Press International strongly protests the new restrictions on media correspondents issued this weekend by the government of South Africa. The restrictions will make it increasingly difficult for correspondents to provide an objective picture -- be it through words, pictures or the broadcast media -- of the situation in South Africa today."

In separate telegrams, CBS News President Edward Joyce and Roone Arledge of ABC News both protested "in the strongest possible terms." Joyce urged Botha to reconsider his action, which he termed a "blow to the free press."