A CIA agent working in South Africa recently dropped in for a friendly visit with one of his counterparts, a major in South African military intelligence. The American volunteered some information he thought his collegue would like to know.

The major, however, was not impressed. Instead, he took some photographs out of his pocket, laid them onther table in front of the American and "watched him go completely pale," according to the teller of the story.

What the pictures showed is not known, but the message to the CIA official was clear: "We know what you do in South Africa and we don't like it." Last week, with the expulsion of three American military attaches for alleged espionage activities, the same message was written in bold letters.

On one level, the invident is a consequence of gradually deteriorating relations since the 1975 Angolan war between the South African and the American intelligence communities that once worked hand-in-glove.

More importantly, the expulsions are an indication of a major reappraisal by South Africa of its defense and foreign policy strategies. The shift holds far-reaching implications for the future of the southern African region; most immediately in Rhodesia and the South African-administered territory of Namibia.

This revised strategic approach almost certainly reflects the increased influence of the military establishment and its intelligence arm since the election of Pieter W. Botha as prime minister six months ago. Botha, now serving his 13th year as minister of defense, represents the military's views which, simply described, are hawkish in defense and moderately forward-looking in domestic issues.

The South Africans have apparently decided that U.S. led moves to solve the region's burning racial conflicts through negotiation either hold too much risk for South Africa or simply do not work. It appears, therefore, that the South Africans intend to replace their grudging cooperation with those western initiatives with a more independent, regional approach in which South Africa will take the lead.

The new policy means South Africa must loosen its relationship with the West, especially with United States.

Foreign Minister Roelof (Pik) Botha, once a lone wolf crying for continued cooperation with Western negotiating efforts, told reporters in Zurich last month: "South Africa must not side either with the West or the East in any conflict. We must concentrate all our efforts in our own region, develop assistance, and build up the understanding between black and white."

News leaks by South African officials speak of a greater southern African confederation or "constellation" of statess. The new approach accents military resistance to Soviet-backed moves rather than negotiated settlements. Pretoria would assume responsibility for the military defense and economic aid to member states.

As explained to one paper, the scheme seeks to build a bulwark of "anti-Communist" states in southern Africa. To many observers, the plan is an embellished version of a strategy the Afrikaner-dominated government here has had in the back of its mind for a lomg time-a retreat into its own isolated fortress as protection against international threats to its policies of racial separation, or apartheid.

This course has become increased attractive to more South Africans as they have concluded that the United States is no longer an ally of whites in Africa and that nothing short of black majority rule in this country will satisfy Washington.

Central to this new strategy is the maintenance of friendly governments-and the military upper hand-in Rhodesia and Namibia. Already the new thinking appears to have produced a change in South Africa's attitude to the settlement reached by Prime Minister Ian Smith and three black leaders in Rhodesia.

In private conversations, South African officials are making a stronger commitment to the Salisbury settlement than ever before. They appear to have decided that they will not allow the biracial setup to lose the war against the Black Nationalist Western guerillas. Diplomats say they are aware of certain things South Africa has done to signel this shift, although they decline to name them.

Bishop Abel Muzorewa, the black leader who is thought likely to be the first prime minister of Rhodesia-Zimbabwe as it will be known under black rule, declared recently he would be willing to make a defense pact with South Africa.

The South Africans have sent a dozen helicopters and some C130's to help the Rhodesians ferry around journalists and other foreign observers during the election next week, according to sources in Salisbury.

Many observers believe that the new aggressiveness displayed this week by the Salisbury government reflects assurances of support from South Africa. Rhodesian commandos hit guerrilla locations in Botswana and Zambia, including the house of black leader Joshua Nkomo in the heart of the Zambian capital of Lusaka. Salisbury's bravado follows recent visits here of Prime Minister Smith and Lt.Gen. Peter Walls, head of Rhodesia's security forces.

In Namibia the U.S. designed proposals for a transition to independence are threat to the new regional concep. By cooperating with them, South Africa is taking the risk that its guerrilla opponents, the Southwest Africa People's Organization (SWAPO), might win United Nations-supervised elections. That would cost South Africa its military advantage in the territory,which protects the entire eastern flank of South Africa-a development not in South Africa's interest, at least for the short-term.

The problem for South Africa is how to back out the U.N. plan without taking the blame for killing chances for a peaceful transition. An estrangement with the United States might be a convenient escape route.

Last month, Prime Minister Botha charged the United States and its Western allies with "deceit" and double-crossing the Namibian talks that was the harshest attack yet on U.S. government by a South African leader. Then, two weeks ago, Foreign Minister Botha charged the leader of the opposition with betraying confidential information to "an enemy of South Africa." the deputy ambassador to the United Nations, Donald Mchenry.

Now comes the expulsion of the American officials amid espionage charges.

There are indications that the South African intellegience community which once worked closely with U.S. agents, is sincerely irked by some of the American spying activities in South Africa. Under normal circumstances this would probably not be enough to expel three American diplomats in a highly publicized manner.

At this time, however, the expulsions also appear to serve South Africa's greater strategic interests, as it tries to ease out of the internationally approved United Nations peace plan for Namibia and into its fortress.