President Pieter W. Botha today pledged to restore to millions of blacks the South African citizenship they lost when the white government set up nominally independent black "homelands."

The move does not confer voting rights or other new powers upon South Africa's disenfranchised black majority, but it was widely seen here as a symbolic departure from the fundamental ideology behind apartheid.

It is also the first concession Botha has made since international pressure began to build following his decree of a state of emergency nearly two months ago.

Identity documents of blacks will record that they are South African citizens, Botha said, whereas before the documents only recorded their tribe. But the action does not affect the phalanx of laws restricting blacks' movements, controlling their right to live in urban areas and consigning urban blacks to racially segregated townships.

Zulu Chief Gatsha Buthelezi, reflecting the views of many of the government's moderate opponents, said he welcomed Botha's move because of the "untold suffering" created by the loss of citizenship, but he said Botha was still avoiding the central issue of sharing power with blacks.

"It is as though he is letting the little kittens out of the bag but hiding the big cat," Buthelezi said.

[In Washington, White House spokesman Larry Speakes said, "It's our position that the citizens of the homelands are citizens of South Africa. However, State President Botha's announcement, if it means and leads to granting of citizenship, would be a positive step." Asked if the U.S. position was that Botha did not go far enough, Speakes said, "Yes."]

The South African leader also said he would call a referendum similar to the one held in 1983 if he decided there was a need for "drastic fundamental change" to provide for blacks' political rights. He did not elaborate, but the 1983 vote was a whites-only poll that approved granting limited political rights to those of mixed-race and Asian origin.

Botha's statement came as new outbreaks of racial unrest were reported in several parts of South Africa and Anglican Bishop Desmond Tutu said he was considering calling for a national strike next month to protest the government's crackdown on political dissent.

While Botha insisted the "sovereignty" of the four homeland states would be preserved, his statement appeared to mark an end to one of the grand dreams of apartheid's original architects: that all blacks someday would be stripped of South African citizenship and consigned to the largely desolate rural areas, leaving urban South Africa as a purely white nation where blacks could work and dwell only as citizenless sojourners.

As such, it may remove one of the obstacles that many black moderates have cited in refusing to meet with white leaders to discuss South Africa's political future.

Botha said he would introduce legislation to restore citizenship to the estimated 5 to 6 million urban blacks who have been stripped of it and made citizens of homelands that in many instances they have never visited. Those blacks apparently would forfeit their homelands "citizenship" and presumably would have the right to remain in urban areas, although Botha did not spell this out.

He also said his government would negotiate with homelands leaders to offer the option of dual citizenship to nearly 6 million other blacks actually residing in them. But Chris Heunis, consitutional affairs mninster, later made clear that the government will not give those homeland blacks political rights in South Africa.

Botha portrayed the change, announced in a speech before a provincial congress of his ruling National Party in the city of Bloemfontein, as an example of his willingness to negotiate significant new changes and to heed blacks' wishes. He lashed out at those who contend that only a continuation of the violence that has led to the deaths of 675 blacks in the past year or civil disobedience will produce change.

"This is the manner in which we will build a common future . . . not by throwing stones and carrying red flags," he said. "This is the manner in which we will create an orderly society with a place for all our children . . . not by shouting slogans on international television.

"South African leaders of all groups will come to terms and find solutions among themselves, not only on the issue of citizenship, but also on our other political, social and economic problems."

He acknowledged that the loss of South African citizenship had caused "frustration" among blacks, "particularly those people who permanently live within the republic and those who in many cases were born here. These strong feelings were due to a sense of rejection and the perception that they were being cut off from South Africa's financial and economic resources."

The new moves were announced only two days after President Reagan ordered limited economic sanctions against Pretoria, but Botha took pains to make clear that the measures were not the result of U.S. pressure.

He said returning U.S. Ambassador Herman Nickel was "fighting with windmills" in calling for significant changes, and he accused Republicans and Democrats in the United States of "opportunistic stunts" at South Africa's expense.

America should "sweep in front of its own door," Botha said, "and they can begin with the red Indians who are living in squalor in their own reserves and with their own ghettos."

Later today Nickel, who returned here last night after being recalled by Washington three months ago to protest South African policies, delivered a message to Botha from President Reagan. Neither government commented on the meeting.

Pretoria's increasing anger over international pressure was reflected when Deputy Foreign Minister Louis Nel told the Bloemfontein meeting the government was reconsidering "whether its hospitality should still be extended" to foreign journalists engaged in "organized lying" about South Africa.

A few hours later, the government announced it was deporting Newsweek reporter Ray Wilkinson, co-author of an article in the magazine's latest issue that Minister of Home Affairs Stoffel Botha said contained "selective reporting, half-truths and false innuendo."

President Botha's statement received a cautious welcome from moderate opponents, who suggested it would be an empty gesture unless the right to vote and the freedom to choose where to live and work were not also established for blacks.

Frederik van Zyl Slabbert, parliamentary leader of the opposition Progressive Federal Party, said the move signaled "the end of the apartheid dream, but now poses the challenge of doing away with the apartheid reality."

Radicals were less impressed. The Azanian People's Organization issued a statement saying Botha's action would not deter blacks from their real goal: majority rule.

Bishop Tutu, the Nobel Peace laureate and unofficial voice for millions of blacks here, could not be reached for comment on Botha's action. But earlier today he issued an ultimatum, warning that unless the government lifted its state of emergency, removed the Army from black townships, released political detainees and opened talks with "authentic" black leaders, he and other black clerics would launch a week-long national strike and boycott.

"If the government does not do this, I am going to tell our people: 'Stock up, do not go out on the streets, stay indoors, the children mustn't go to school,' " Tutu said.

Two men died today in violence, one a plainclothed police detective of mixed-race, or Colored, origin who was killed at the funeral of another victim of violence in a Colored township outside Cape Town.

Police said the detective had been observing the funeral when he was recognized by the crowd and attacked by several mourners. He opened fire with his service revolver and wounded at least one man before being overcome and killed, police said.

A general strike called by Colored and black residents outside Cape Town appeared to be gaining support on its second day. They are protesting the closing of about 450 Colored public schools and the arrests of several dozen community activists following 10 days of unrest in the area.

In Clermont township outside Durban, a black man was burned to death by a mob. Police reported 82 arrests in various incidents.