Early talks between South Africa's white-minority government and its main black underground movement, the African National Congress, seemed unlikely today as President Pieter W. Botha took a hard line in rejecting a truce offer by the imprisoned ANC leader, Nelson Mandela.

Mandela, who has been in prison for 21 years, offered to end his movement's guerrilla war and negotiate if the government would legalize the congress, which it outlawed in 1960.

Asked for his reaction to the offer, Botha replied through his press officer, Jack Viviers, who said: "The president's position is quite clear. We will talk to the ANC if they first turn their backs on violence and join us on the road to finding a future on the path of peaceful constitutional negotiation.

"But there is no way we can even consider the possibility of talking to an organization that still espouses violence."

Nor would it be enough for the congress simply to make a declaration of intent about abandoning violence. "There would have to be hard-and-fast evidence over a considerable period of time that violence had in fact been abandoned," Viviers said.

Independent observers said this left a gap between the two sides that would be difficult to overcome.

Expanding further on the president's views, the press officer said Botha held out little hope of the congress making such a renunciation of violence because "the ANC does not belong to itself, it is a surrogate of the Soviet Union."

This echoed a frequently stated government view that the congress, which once had an alliance with white members of the South African Communist Party and today receives some of its arms from the Soviet Union, is itself a communist organization.

Exiled leaders of the congress deny this. While admitting that there are individual communists in the movement and that it advocates a socialist program for South Africa, they insist that its philosophy is basically African nationalist.

Mandela, 66, who is serving a life sentence for trying to overthrow the apartheid government, made his truce offer in an interview with a visiting British peer, Lord Nicholas Bethell, in Cape Town's Pollsmoor Prison 11 days ago.

Lord Bethell quoted Mandela as saying, "I appreciate the Soviet Union" because it was an early supporter of black independence campaigns, but "it does not mean I approve of their internal policy."

Botha rejected the truce offer at a time when there is a growing movement among reformist members of his ruling National Party to release Mandela and other congress leaders and begin talks with them about the racially divided country's future.

Several of these reformists have held secret meetings with members of the underground movement at their exiled headquarters in Lusaka, Zambia, over the past two months. A group of influential Afrikaner academics is due to visit there in February.

Botha's reaction to Mandela's offer was markedly more negative than an initial response from Foreign Minister R. F. (Pik) Botha, who said Monday his personal view was that if Mandela renounced violence as a means of achieving political objectives, "there would be at least a sympathetic consideration of the whole matter."

Two weeks ago, Botha publicly denied a report that a group of National Party parliamentary members had met secretly with congress leaders in Lusaka, adding an injunction that "no member of the National Party will be allowed to hold talks with the ANC."

Some observers think Botha has taken a hard line to discourage the pro-talks movement in his party ranks from gaining strength, judging this to be an inappropriate time to risk causing a white backlash by talking to blacks whom the government has portrayed for years as "communist terrorists."

Botha is under strong attack from a white extremist splinter group, the Conservative Party, which accuses him of abandoning his party's traditional segregationist policy, called apartheid, and becoming an integrationist because he has given a token role in the central legislature to members of the mixed-race and Asian minorities.

These attacks are being made at a time when South Africa is in its deepest economic recession in 50 years, with rising unemployment and inflation soon expected to top a 20 percent annual rate.

"The president may have decided that this is not the time to meet with the ANC, but I believe it is inevitable that at some stage they will talk," said Hendrik van der Merwe, an Afrikaner Quaker who has played a role in setting up some of the secret meetings.

According to Bethell, a member of Prime Minister Margaret Thatcher's Conservative Party who is vice president of the European Parliament's Human Rights Commission, Mandela said his followers would lay down their arms if South Africa agreed to legalize and negotiate with the banned congress.

Writing in a British Sunday newspaper, the peer quoted Mandela as saying: "The armed struggle was forced on us by the government, and if they want us to give it up, the ball is in their court. They must legalize us, treat us like a political party and negotiate with us. Until they do, we will have to live with the armed struggle.

"It is useless simply to carry on talking. The government has tightened the screws too far. Of course, if there were to be talks along these lines, we in the ANC would declare a truce." Because of South Africa's stringent security laws, which probihit newspapers from quoting any statements by banned people or organizations, South Africans remained unaware of Mandela's offer for two days after it was published in Britain, the United States and elsewhere.

They learned of it only when a liberal member of the parliamentary opposition, Helen Suzman, used her special privileges to disclose it in Cape Town's House of Assembly yesterday, adding that she believed the government should release Mandela.

South African newspapers are allowed to publish whatever is said in Parliament, and most seized the opportunity to report the offer as front-page news this morning.

However, Mandela's wife, Winnie Mandela, said in an interview that this had long been his position. "That has always been his attitude, and the government knows it," she said.