President Pieter W. Botha sought today to justify South Africa's military raids into three neighboring black states in terms of the U.S. raid on Libya last month and declared that Pretoria would not allow "the double standards and hypocrisy of the western world" to support the U.S. attacks while denouncing South Africa's military action.

As condemnation of yesterday's South African attacks intensified, a series of statements by government spokesmen and editorials in progovernment newspapers here all hit the same theme -- that South Africa, like the United States, was justified in combatting a source of terrorism.

The South Africans' target, the African National Congress, is waging a guerrilla war to overthrow the country's apartheid system of segregation and white-minority rule.

In a speech to the white-dominated Parliament in Cape Town this afternoon, Botha quoted President Reagan's words after the raid on Libya, saying self-defense was not only America's right but its duty, and that the mission was consistent with Article 51 of the United Nations Charter, which justifies defense against aggression.

"It must now be patently clear to the international community that the ANC is not engaged in a so-called struggle but that it is hell-bent on the destruction of South African society, that it wants power through the barrel of a gun and that it fully intends to remain in power by means of force," the South African president said.

Both the White House and the State Department denounced the South African raids yesterday and rejected any parallel between the ANC and the Libyan government of Col. Muammar Qaddafi.

In Lusaka, Zambia, the ANC, the main black resistance group, today pledged to intensify its sabotage campaign inside South Africa and called on the United States to intensify pressure on Pretoria to end apartheid.

In Harare, Zimbabwe, foreign ministers of the six black-ruled "front-line" states condemned the raids and called for international economic sanctions, saying the attacks showed Pretoria had embarked on a "suicidal path of destruction, violence and death."

Like Reagan after Libya, Botha found today that most of his home constituency supports his military action while outsiders are critical.

There has been a chorus of approval from the semiofficial broadcasting service and the pro-government, Afrikaans-language press, as well as from political parties of the far right, which felt such a display of toughness was long overdue.

Businessmen and white liberals have criticized the attacks. Colin Eglin, leader of the small Progressive Federal Party, condemned the raids as "a major political blunder" that would invite international sanctions, increase racial tensions and make black states in the region more dependent on the Soviet Union.

About 4,000 students held a protest meeting today at Johannesburg's multiracial Witwatersrand University and clashed with the police. The Black Sash civil rights organization staged a street demonstation. Members of a white organization called Jodac, which supports the black activist cause, issued a statement denouncing the raid as "illegal."

The businessmen's disapproval has been more indirectly expressed. The Johannesburg stock exchange reflected another drop in confidence today and the nation's currency, the rand, seemed in danger of repeating its plunge of last August, shedding nearly 300 points to a value of 44 U.S. cents since the raids.

The rand slumped to a record low of 34 cents after a hard-line speech by Botha in August that undermined confidence in his promises to achieve stability through reform and caused foreign banks to refuse to extend deadlines for repayment of $14 billion worth of short-term loans.

Since then, South Africa has managed to negotiate itself partly out of trouble through a phased repayment arrangement with the banks and the splitting of its currency into separate external and internal values that enables the central bank to prop up the domestic rand.

International reaction to the military raids now is threatening this fragile recovery. The external rand, regarded as the true indicator of foreign confidence in South Africa's economy, slumped to a perilous 28 cents today.

In Moscow, the Kremlin joined in criticizing the attacks, noting a "sinister link" between the South African raids and the U.S. attack on Libya and calling the two countries' actions "analogous in style and method."

Canada indicated disapproval of the raids by temporarily recalling its ambassador for consultations.

Inside South Africa, opponents of the government's policies are a minority of the white population. As John Barratt, director of the respected Institute of International Affairs, observed in an interview, "All opinion polls indicate overwhelming support for this kind of action among whites."

Among blacks the reaction is diametrically opposite. Few polls are conducted among the voteless black majority, but the sentiment there has become so intense during the past two years of violent protest in the segregated townships that opinion polling seems unnecessary.

In his speech today, Botha sought to cast the ANC in the same light as Libya and the Palestine Liberation Organization. He claimed there was a friendly relationship between the ANC and the PLO and said that both had sent guerrillas to Libya as well as to Angola for training.

"The ANC's ties with the executor of terrorism whom President Reagan had identified as 'the mad dog of the Middle East' " were well established, Botha said.