South Africa has negotiated a cease-fire agreement between the government of Mozambique and the guerrillas of that country's National Resistance Movement, Foreign Minister R. F. (Pik) Botha announced here today.

A joint commission has been set up to work out details of the cease-fire, and Botha said in an interview after the announcement that South African troops would be sent to Mozambique as a peace-keeping force to monitor it.

The joint commission held its first meeting immediately after today's announcement, under the chairmanship of South African Deputy Foreign Minister Louis Nel. Botha said it would decide the size and precise role of this peace-keeping force.

"They will be there to see that no one breaks the cease-fire and that no one takes advantage of the cease-fire," Botha added.

Botha, who acted as go-between during 70 hours of indirect talks here between the Maputo government and the rebels over the past week, also said that South Africa would send a "peace corps" of military and civilian personnel to help reconstruct the shattered economy of its black-ruled, Marxist neighbor. Mozambique and South Africa signed a nonaggression and good neighborliness treaty in March.

Sources close to the seven-man Mozambique delegation, which was led by Economic Affairs Minister Jacinto Veloso, dismissed any possibility that the cease-fire agreement would lead to a coalition government.

The resistance movement's leader, Alfonso Dlhakama, sought such a coalition in his talks with Botha, but sources said the government delegates were adamant in their refusal to consider it.

"The most Maputo will agree to is an amnesty and possibly an agreement to settle the rebels on some land," one source said. "There can be a payoff -- nothing more."

Botha appeared to confirm this when he said in the interview that there had been no substantive discussions about a constitutional role for the rebels. The negotiations had been confined to two points, he said: acceptance of Samora Machel as president of Mozambique, and agreement that fighting should stop.

Evo Fernandes, leader of the rebel delegation to the Pretoria talks, told Reuter news service that his movement had accepted the principle of a cease-fire but that its terms still had to be worked out by the new joint commission. Fernandes said that final agreement would depend on a resolution of political issues, including his movement's demand for a share of power in Mozambique.

"There is no commitment from our side to keep Machel in power in future," Fernandes told Reuter. "We are simply recognizing the present reality."

Mozambique's national news agency issued a commentary on the Pretoria agreement emphasizing that it did not represent a "political accommodation between Mozambique and the MNR (National Resistance Movement) bandits." The agency said the agreement provided for the rebels to stop fighting while the Mozambican Army took the offensive to pacify the countryside, Agence France-Presse reported from Maputo.

["Now more than ever these offensives should be stepped up, making use of the political and diplomatic thrust of the past two months," the agency said.]

Observers here see the cease-fire agreement as a major diplomatic coup for South Africa, which is trying to cast off its image as a pariah state because of its segregationist policies, called apartheid, and to project itself as the dominant regional power whose cooperation is essential for peace and stability.

An obviously delighted President Pieter W. Botha underlined the point when he made a brief appearance at the announcement site in Pretoria today to say that "this important event is a signal to the world that we are serious in our efforts to achieve peace in our region."

The use of South African troops as a peace-keeping force in a black nationalist country is a particularly striking development. South Africa already is participating in a joint commission that is monitoring a cease-fire in southern Angola. Some observers expect Pretoria to use its apparent acceptability to these radical black governments as a peace-keeper to strengthen its argument that it should form part of a regional commission to monitor Namibia's transition to independence, instead of a United Nations force doing that job.

For Mozambique, the agreement had become a matter of necessity. The resistance movement's guerrillas, who began trying to overthrow the Machel government soon after Mozambique became independent in 1975, are active in all 10 of the country's provinces and have attacked the outskirts of Maputo.

They have laid waste to the countryside, disrupted communications and brought agricultural production to a standstill. The effects of their activities, coupled with a devastating drought, resulted in an estimated 100,000 people dying of starvation last year in the provinces of Gaza and Inhambane.

For years Mozambique accused South Africa of trying to destabilize its socialist system by supporting the guerrillas, while Pretoria in turn accused the Machel government of aiding guerrillas of the African National Congress who are trying to overthrow white-minority rule in South Africa.

In March, as Mozambique's economic plight grew worse and after mediation by the United States, which saw a chance to draw the avowedly Marxist Machel closer to the West, Pieter Botha and Machel met and signed a mutual nonaggression treaty called the Nkomati Accord. Under its terms, each side agreed not to aid rebels operating against the other.

Since then, Mozambique has compelled several hundred members of the African National Congress to leave its territory, reducing the movement's presence there to a 10-man diplomatic office in Maputo.

On the other hand, the Machel government has complained that the resistance movement has continued to receive aid from across the South African border, although it has been careful not to accuse the Pretoria government itself of making the supply drops.

As the guerrillas continued to rampage across the countryside, Mozambican officials began talking three weeks ago about the imminent collapse of the Nkomati Accord. This appears to have spurred South Africa to action, because it regards the accord as a vital breakthrough in its diplomatic campaign.

In a determined effort to save the accord, Foreign Minister Botha persuaded the Mozambique government and the resistance movement to open the indirect talks in Pretoria a week ago. He said today the talks had been intensive and difficult and had come close to breakdown "about four times."

"But in the end we got this agreement. It is a big day for southern Africa," Botha added.