After hesitating for almost two months, black African nations have begun criticizing the Reagan administration.

Three important African leaders this week criticized what they saw as a drift by the administration toward improved relations with white-ruled South Africa and away from a U.N.-sponsored plan to bring independence to the South African-controlled territory of Namibia.

Government-controlled or influenced newspapers have been much harsher in their criticism.

Two weeks ago, Mozambique expelled four U.S. diplomats and two dependents after accusing them of being CIA agents and providing information used by South Africa in a raid against a black nationalist office near Maputo, the Mozambican capital. In retaliation, the United States has cut off food shipments to the drought-stricken country in the first instance of the new administration carrying out its threat to use food aid for political purposes.

The Reagan administration has said it is still reassessing U.S. policy toward Africa, which, under former president Jimmy Carter, gave strong support to black nations at the expense of South Africa.

A return to former secretary of state Henry Kissinger's policy of favoring South Africa could lead to a shift away from the United States and toward the Soviet Union in this mineral-rich area, in the view of most observers.

The remarks by the three African leaders and hostile press commentary came before publication of reports -- denied by the State Department -- that the Reagan administration was considering inviting South African Prime Minister Pieter W. Botha to Washington. Such a move would cause a sharp outcry from most black nations that have shunned diplomatic contacts with Pretoria.

Zimbabwe's Prime Minister Robert Mugabe, speaking before the Reagan administration formally asked Congress to repeal the ban on aid to rebel forces in Angola, told a press conference today that it would be "extremely repugnant" if the United States supplied arms to the forces of Jonas Savimbi, who is seeking, with South African backing, to overthrow the government of Angola.

During his election campaign, Reagan had advocated such a move and prior to today's request officials had hinted that the administration was moving in that direction.

Yesterday Mugabe told a lunch for visiting Sierra Leone President Siaka Stevens, chairman of the Organization of African Unity. "It would be most regrettable and harmful to the good relations which had hitherto existed between us and the United States . . . if the Reagan administration were to lead support to the South African regime," which he called "aggressive, hostile and repugnant."

"We hope sanity will prevail in Washington," he added.

He said he had written to President Reagan "appealing for a correct direction of his policies on southern Africa. I trust our voice will be heeded."

It is understood that the letter was not directly critical of U.S. moves during Reagan's first two months in office but simply laid out Zimbabwe's grievances with South Africa in a frank manner and in effect asked what Reagan was going to do about the situation.

Mugabe is undoubtedly being cautious in his remarks toward the new U.S. administration because he is relying on Washington to be one of the key aid donors in helping to rehabilitate his nation from a devastating seven-year independence war.

Stevens, who speaks for the OAU during his year as its chairman, was more direct in a speech the night before.

"The Reagan administration appears to be bent on supporting South Africa at all costs," he said, "because that administration believes that South Africa is the stronghold of Western civilization in Africa."

He said he had also written a letter to Reagan that "I hope will have some effect on their final decision on their policy toward South Africa."

Mugabe said today that several other African leaders had written similar messages.

Mozambican President Samora Machel leveled the sharpest criticism at Reagan earlier this week, saying African countries were headed for "difficult times" in their relations with the United States.

"This is an administration which considers just struggles, the struggles of peoples for their freedom and independence, as terrorism," he said.

Marxist-governed Mozambique, however, has apparently decided that it has nothing to gain by maintaining good relations with the United States.

Until recently Mozambique had been seeking closer ties with the United States. Carter had gained congressional approval for the first U.S. aid to that country since independence in 1975 and an aid mission was in the country examining ways to use the $6 million in assistance when the expulsions occurred. Washington withdrew the mission.

The United States accused Cuban intelligence agents of seizing a member of the U.S. Embassy staff and trying to recruit him. After this failed, U.S. officials say, Mozambique expelled the diplomats.

Western diplomats note, however, that anti-Cuban charges by the Reagan administration fall on somewhat deaf ears in much of Africa, which does not share Washington's attitude toward the Fidel Castro government.

The government-controlled Times of Zambia alleged that U.S. intelligence agents had assisted commandos of the previous white Rhodesian regime in destroying key installations in Zambia. The editorial led to a sharp exchange in the columns of the paper between the editor and U.S. Ambassador Frank Wisner, who denied the allegation.

The possibility of arming Savimbi and Reagan's apparent warming to South Africa have also raised the ire of the African press, which, in most black African countries, reflects the views of the rulers.

Earlier this month, Reagan described South Africa as a "friendly" country and asked whether the United States could "abandon a country that has stood beside us in every war we've ever fought."

The government-owned Zambia Daily Mail said arming Savimbi would mean "Reagan has finally decided to ditch black Africa and align himself firmly to her adversaries."

"Africa must therefore redefine her so-called friendship with America under the Reagan administration," it concluded.

The government-owned Sunday News in Tanzania called such a possibility "big-power arrogance" that "is even worse than the Soviet Union's invasion of Afghanistan."

The independent Sunday Nation in Nairobi, Kenya, called Reagan's views on South Africa "naive and ill-conceived."

Mugabe declined today to comment on Reagan's remark, saying he did "not want to judge him hastily" since Reagan was still formulating his policy.

He did not mince words, however, over the possibility of U.S. support for Savimbi's Union for the Total Independence of Angola, one of three rebel factions that originally fought for control of Angola.

"The situation in Angola is clear," he said. "You have a legitimate government with sovereign power and the right to territorial integrity. The dissident element of Savimbi is nothing more than a group of reactionaries who are trying to subvert legitimate authority in a counterrevolutionary process."

The United States has refused to recognize the government of Angolan President Eduardo dos Santos because of the presence of an estimated 20,000 Cuban troops in the country.