France issued an unusual public warning to South Africa today to abandon plans for a nuclear test explosion or face "serious consequences" in its relations with Paris.

South Africa formally denied over the weekend that it was planning a nuclear test. But in separate statements that directly contradicted those denials, the French Foreign Ministry's spokesman and Foreign Minister Louis de Guiringaud said today that France had received "more precise indications" about an imminent nuclear test.

France has learned that South Africa is preparing "an atomic explosion that the South Africans assert will be peaceful," De Guiringaud said in a radio interview. Such an explosion would "imperil all peace efforts in southern Africa," the French diplomat added.

South African Foreign Minister R.W. (Pik) Botha, who described weekend reports of a projected atomic test as "wholly and totally unfounded," declined comment on the French statements, news agencies reported from Pretoria. Under Secretary Brand Fourie, however, called the French allegation - "incomprehensible."

His original denials were spurred by an inquiry from the United States on the accuracy of a report featured earlier this month by Tass, the official Soviet news agency, on South Africa's nuclear capability. Britain has joined the United States, West Germany and France in expressing concern over the prospect of the white-minority government's joining the world's nuclear club.

The Washington Post reported in February that South Africa was working on a nuclear explosive device and could produce one in a matter of months if it chose to do so.

French Prime Minister Raymond Barr said in February that South Africa "already has a nuclear military capability." His statemnt was part of his defense of French plans to sell two 922-megawatt nuclear-power generators to South Africa. The reactors are to be installed by 1981.

A well-informed U.S. government source said in February that South Africa had developed an independent nuclear industry that was within two to four years of manufacturing an atomic bomb. He said he was convinced that the South Africans could cut that period to a matter of months if they concentrated funds and manpower in a crash version of their program.

The United States in recent years provided technology and nuclear material to South Africa. In part, this willingness stemmed from U.S. access to South African uranium in building up America's nuclear arsenal during the Cold War.

A South Africa pilot plant near Pretoria that can enrich uranium to weapons-grade levels, however, was apparently developed without direct U.S. involvement, according to U.S. sources.

De Guiringaud's apparently undiplomatic public challenge to South Africa's denials follows an embarrassing confrontation Friday with Tanzanian students, who greeted the French official in Dar es Salaam by shouting slogans condemning France's slaes of arms and nuclear-power equipment to South Africa.

When the Tanzanian government refused to meet De Guiringaud's immediate calls for an apology, he cut his visit short and left in huff for Paris. Tanzanian President Julius Nyerere said Saturday that it was "unthinkable" that France would ask for an apology "when it is France that should apologize for its arms sales" to South Africa.

De Guiringaud today sharply repeated French denials that the gerating reactors France is selling South Africa could be used for making weapons.

Anyone who maintained otherwise was acting like "an enemy of our country," he said. Tass had originally linked the French sales to South Africa's military nuclear capability.

All enriched fuel extracted from the reactors would be sent to France for reprocessing into plutonium and would not be returned to South Africa, De Guiringaud asserted. South Africa has its own highly secret enrichment process, which it hopes to operate commercially in the 1960s.

Evidently hoping to overcome some of the sting of De Guiringaud's rebuff by the Tanzanians, Foreign Ministry officials reaffirmed earlier today that France would not sign new arms contracts of any nature with South Africa after the delivery of two attack submarines and two destroyer escorts already on order.