In a surprise announcement, the South African government notified American officials today the U.N. Ambassador Andrew Young may not be welcome to visit here on May 19 and 20.

South African Foreign Minister Roelof "Pik" Botha announced today that it may not be "convenient" for his government to receive the controversial ambassador, who serioulsy antagonized the South Africans by responding "yeah" when asked of the South African government is "illegitimate."

Botha said the situation developed because of a misunderstanding about the purpose of Young's visit, and because Young's office did not use "normal channel's" in planning the trip.

There is some feeling among diplomats here that the reaction also reflects South African governement feelings that Young represents a major threat to South Africa because of his position at the United Nations and in African policy making in the United States.

Young's trip to South Africa would have coincided exactly with the meeting in Vienna between South African Prime Minister John Vorster and Vice President Walter Mondale, which may be another reason for the government's harsh reaction.

Both the South African and Rhodesian government view Young with hostility because of the former civil rights leader's harsh criticism of Africa's only two remaining white minority governments, his ties with black nationalist leaders both countries, and his remarks that Cuba has been a stabilizing force in Angola.

The hint that the reaction may have broader implications was strengthened tonight in an interview Botha gave the South African Broadcasting System in which he indicated that Western nations are pushing his government too hard.

"We are an independent country," said Botha. "We are proud nation. We are not going to be dictated to from outside . . . not even the United States. We are not prepared to crawl before them, least of all before Mr. Andrew Young."

The foreign minister said it is now up to Young to determine whether he wants to use the appropriate channels to clarify the purposr of his trip.

Washington Post writers reported the fillowing in the United States:

Interviewed at The United Nations, Young said, "I am more concerned about blacks being upset than the government. My position is essentially a moderate one which most blacks there will not like, but the government won't like either, so they have a right to be nervous."

South African and U.S. sources as the United Nations said Young had planned to visit Johannesburg, and at least drive through the nearby black township of Soweto driving a one-day stay there May 20 as part of an African tour he plans.

"My only interest in South Africa," he said, "is avoiding unnecessary bloodshed, among blacks or whites. They can avoid it and if I can help, I'll be glad to."

Sources close to Young said that the itinerary would be arranged by South Africa's best-known business leader, diamond mogul Harry Oppenheimer, except for a possible stop to meet with black journalist at the U.S. Information Center in Johannesburg.

Oppenheimer, president of the large Anglo-American Mining Corp., actively supports the South African Progressive Reform Party which provided white opposition to apartheid.

Young said an invitation to speak to South African businessmen and white students as Witwatersrand University was cleared with the South African government through the U.S. ambassador there.

In Washington, State Department spokesmans Frederick Z. Brown, was asked whether Young wanted a confrontation. Brown replied, "I'm sure he's not seeking a confrontation."

Brown also said he did not know when the State Department learned of Young's plans for his private visit to South Africa.

Brown rejected reporters's suggestions that Young's trip demonstrated lack of coordination in the administration's Africa policy. The department, he added, is aware of the implications of Young's trip and approves of it.

Young was scheduled to fly to Johannesburg from a U.N. conference in neighboring Mozambique on the problems of southern Africa, which will be attended by leaders of South Africa's two banned nationalist movements - the Pan African Congress and African National Congress - another factor that may annoy the South African government.

In his statement, Botha explained: "A week ago a South African industrialist informally inquired whether we would raise any objections to an invitation to Ambassador Young to Speak to group of South African businessmen and to students of the University of Witwatersrand.

"We replied that in principle there would be no objections provided Ambassador Young approached us through the normal channels."

Then local press reports indicated that Young would also meet African leaders - including former Pan African Congress leader Robert Sobukwe, whose two children have lived with Young for the past two years - while not planning any discussions with South African officials, who may have interpreted this as a slap in the face and an extension of Young's view that the government is "illegitimate."

Botha, who until earlier this year was South Afruca's representative at the United Nations, added: "According to press reports the purpose and basis of his visit would appear to be different from the understanding we had. It would also appear that the normal channels were not used in approaching us."

The South African media have given major play to a statement by Secretary of State Cyrus Vance that Modale would take a tough line on South Africa's domestic policy of apartheid - or separate development of the races.

Just last night, Botha retaliated that South Africa would be also be tough on the United States, adding that "South Africa is not going to Vienna to stand in the dock."

Since the beginning of the year, Vorster has repeatedly warned South Africans that they may have yo "go it alone," without the West if the conditions for support were too great.