South Africa said for the first time today that "elements" from within its territory probably were supporting Mozambique rebels trying to overthrow the government of President Samora Machel.

Foreign Minister R.F. (Pik) Botha made the admission after talks with U.S. Assistant Secretary of State for Africa Chester A. Crocker, who is on a fireman's visit to southern Africa trying to avert collapse of the regional detente that he helped negotiate between South Africa, Mozambique and Angola.

Crocker's arrival in Pretoria today followed Mozambican allegations that South Africa is failing to honor a year-old peace treaty brokered by the United States. It also coincided with an announcement by the U.S. Embassy that it is shutting down a liaison office opened a year ago to help supervise South Africa's stalled troop withdrawal from Angola.

The United States has been increasingly concerned that continued action by guerrillas of the Mozambique National Resistance Movement is posing a threat to the peace treaty, called the Nkomati Accord, which Washington helped arrange last March.

The accord provides that South Africa cease all aid to the rebel movement which it previously sponsored, but in fact the guerrillas have stepped up their operations since the signing and are now active in all 10 of the country's provinces.

Mozambique has complained repeatedly that it believes the rebels are still being supplied from South Africa, but it has stopped short of accusing the South African government of aiding them.

Matters came to a head last month when three British travelers were killed by guerrillas only two miles after driving through a South African border post, and Mozambican security forces said they followed the guerrillas' tracks back to the border.

Rail traffic between Johannesburg and Maputo, Mozambique's capital, was halted this week when a bridge 15 miles from the South African border was sabotaged.

With the Marxist government that Washington has been coaxing closer to the West looking increasingly vulnerable, the United States announced last month that it would seek authorization to give more than $1.1 million in "limited military assistance" to help stabilize Mozambique.

Crocker's talks with Botha followed a meeting in Pretoria yesterday of a joint Mozambican-South African commission established under the treaty to investigate claims of violations.

Botha said after his session with Crocker that the Mozambican delegation, headed by Security Minister Sergio Vieira, had "submitted to us evidence that there might be elements inside South Africa supporting Renamo," the acronym by which the rebel movement is known.

South Africa likewise had raised "aspects of violations" with Mozambique, Botha said.

The foreign minister continued: "I believe there are elements in this country who have supplied Renamo with assistance of some form or another.

"But," he added, "not a single bit of evidence has been produced to show that this was done by any department of the South African government. That is what is important."

Botha said his government was doing all it could to ensure that there were no further transgressions by these "elements."