JOHANNESBURG, FEB. 15 -- The South African government and the African National Congress today overcame several major stumbling blocks to the start of constitutional negotiations by agreeing on the political and military activities that the ANC will be allowed to undertake during a transition to a new government.

According to a joint statement, the ANC agreed that it was "vital" to exercise control over its guerrilla forces and their weapons "to ensure no armed actions or related activities occur," while the white government accepted the right of the black majority "to express its views through peaceful demonstrations," provided that such "mass action" is not accompanied by "violence and intimidation from whatever quarter."

President Frederik W. de Klerk said the accord was "of essential significance" and would serve as "a stimulus" to the stalled negotiating process. He promised that the government would deal "more comprehensively" now with the release of political prisoners and return of up to 40,000 exiles.

As a result of the agreement, "we will be moving rapidly towards the commencement of multi-party negotiations," de Klerk said.

The accord came after months of deadlock and an all-day meeting between de Klerk and ANC leader Nelson Mandela in Cape Town on Tuesday that the president described as "positive and indicative of a genuine desire on both sides to solve difficult problems sensibly. It bodes well for the road ahead."

ANC spokesman Pallo Jordan said the ANC "gave away a very great deal" but also gained "quite a lot" from the agreement, namely government acceptance of peaceful "mass action" protests such as boycotts, strikes, rallies and street marches, and a clearer definition of the status of the ANC's military wing inside South Africa.

The agreement states that the military wing no longer would launch attacks by arms, explosives or incendiary devices; infiltrate arms and material into South Africa; conduct training in the country; create underground structures; make statements inciting violence, or threaten armed action.

The ANC agreed to a "phased process" of returning guerrillas to normal life and legalizing their arms. The two sides also agreed to set up a committee to implement their agreement and arbitrate any disputes.

"The democratic process implies and obliges all political parties and movements to participate in this process peacefully and without resort to the use of force," the joint statement said.

The government failed, however, to get any firm commitment from the ANC to do more than "suspend" its armed struggle, although the statement said there was a "presumption" that the negotiating process would lead to a situation where "there would be no return to armed action."

The ANC also did not agree to demobilize its guerrilla forces, or end their training, outside the country.

De Klerk indicated his unhappiness over these issues. "Naturally" the government could not accept as sufficient the mere "suspension" of the armed struggle, he said. He also noted that there had been no agreement over the disposition of ANC arms caches.

"The arrangements contained in the agreement are mere directives and are clearly inadequate," he said.

Also left in dispute was the number of political prisoners to be freed by the government. The government says there are no more than 600, but the ANC's Jordan put the number at 3,226. Only 10 percent of them had been released so far, he said. His figures were taken from the Human Rights Commission, which includes in its calculations persons in jail under both "security" and "unrest" laws, he said.