CAHAMA, ANGOLA -- Capt. Carlos dos Santos, a self-assured young officer who walks with a swagger, had just completed a monologue in which he vowed that troops in his command would drive the South African Army out of Angola whenever it dared enter.

The world would hear the explosions, dos Santos assured his visitors, and the Angolan Army would not need any help from Cubans or Russians.

"Do you see any foreign faces around here?" he asked.

As he stepped outside an officers' mess in this bomb-scarred southern Angolan town, a car skidded to a halt in the dust and a Soviet officer, his face red with anger, barked an order to dos Santos to feed his troops at once. Then, warily eyeing several American journalists, the Russian roared away in a cloud of dust with a chastened dos Santos at his side.

The brief episode underscored the sensitive relationship between the struggling Angolan Army and the estimated 950 Soviet advisers and 37,000 Cuban troops stationed in this country as the 12-year-old civil war with U.S. and South African-backed anticommunist rebels grinds on with no end in sight.

It also illustrated the Marxist Angolan government's dependence on the management skills of its Soviet and Cuban patrons. But there are increasing signs that President Jose Eduardo dos Santos may be prepared to negotiate with the United States over a phased withdrawal of Cuban troops in exchange for formal diplomatic recognition from Washington.

The withdrawal of Cuban troops from at least the southern provinces of Angola is expected to be high on the agenda when leaders of the ruling Popular Liberation Movement of Angola (MPLA) meet later this month in the capital, Luanda, with U.S. Assistant Secretary of State Chester A. Crocker.

Its economy paralyzed by the debilitating war with Jonas Savimbi's National Union for the Total Independence of Angola (UNITA), the Angolan government hopes that it can persuade Washington to cut off its covert aid to the rebels and influence South Africa to cease its constant cross-border incursions in support of Savimbi.

In an election year in the United States -- and with Angola enmeshed in the East-West ideological conflict -- the hopes may be unrealistic. But it is a measure of the Luanda government's despair over the course of the war that it is willing to strain its relations with its communist benefactors by seeking ties to the United States.

Senior Angolan political and military leaders repeatedly said in interviews that they realize the guerrilla war against Savimbi's forces cannot be won militarily as long as the powerful South African Army is poised just across the border in the territory of Namibia, ready to intervene whenever the Angolans get the upper hand.

They also said that Angola cannot go on indefinitely spending half its budget on the war while its economy is being bled dry by falling oil revenues, massive food shortages and the damage done by Savimbi's guerrillas to rural transport and services.

Despite wildly exaggerated claims by the rebels and the ruling party of major engagements in which hundreds of enemy dead are counted, there has been no major offensive by either side since the winter of 1985, when the Angolan Army attacked Mavinga, the gateway to UNITA's headquarters in Jamba in southeastern Angola. It was repelled at the last moment when South African forces intervened, according to senior Angolan officials and informed western diplomats.

President dos Santos said in Luanda last week that he has no plans for an imminent offensive. He added that claims by the rebels that a new major Angolan Army push toward Jamba already is under way were merely attempts to get more U.S. military aid.

Lt. Col. Luis Faceira, commander of Angolan forces in the southern provinces of Huila, Cunene and Namibe, said in an interview in his headquarters in Lubango that his last big attack against UNITA was in December near Chingongo, where 120 rebels were killed.

The last big engagement with South African forces, Faceira said, was on Jan. 26 when an Angolan force of 60 men attacking near Mongua was hit by 34 Caspir armored vehicles, four ground support aircraft and 12 helicopters. Faceira said he lost 23 men and that the South Africans said they had one dead.

"We found it to be absurd that there wasn't even a minimum coordination of power. Against 60 men they used 34 Caspirs and 12 helicopters! South Africa obviously is not going into combat with as much confidence as it did years ago," said Faceira.

The commander characterized his conduct of the war in the south as two-pronged, with about 90 percent of his troops in defensive positions to respond to South African incursions. The remainder, he said, are engaged in counterinsurgency operations designed to prevent UNITA guerrillas from mounting attacks farther north.

He said these include organizing People's Defense militias in rural villages and arming them so that the estimated 1,200 UNITA guerrillas operating in the three southwestern provinces will be forced to mount larger, and more easily traceable, guerrilla patrols as they seek new economic targets to attack. Most of these targets, officials said, are rural transport systems, power plants, water wells, schools and health clinics.

UNITA is said to have 28,000 regular troops and 35,000 guerrillas, most of them in the far southeast corner of Angola. The government's strategy has been to try to push the rebels into the sparsely populated enclave, where they are less of a threat.

Angolan officials and foreign diplomats said the Army is unwilling to launch a major offensive against Jamba because it knows that to do so would invite massive South African retaliation.

Moreover, they said, the Army learned from its 1985 experience that to mount such an attack would stretch its supply lines too thin. Support bases would be hundreds of miles to the north, while the South African ground and air support bases are only a short distance across the Namibian border.

Angolan officials and western relief workers who travel extensively in the war zone said the UNITA guerrillas' primary strategy is to cripple rural transport by planting thousands of road mines supplied by South Africa and raiding rural villages, in search of food and in an attempt to intimidate local residents.

The strategy has had a large measure of success. The southern provinces are virtually tied in knots and unable even to move sorely needed food northward to Luanda because of the hazard of road mines.

But it has taken an enormous human toll, leaving 15,000 war-inflicted civilian casualties, most from land mines, and an estimated 690,000 displaced persons, according to western relief workers.

Gerd Merrem, who travels extensively in the rural areas for the U.N. Development Program, said he increasingly has encountered cases in which UNITA guerrillas have planted antipersonnel mines in farm fields to discourage people from harvesting their crops.

"What type of war objective is it that willfully mutilates women and children? The indiscriminate use of antipersonnel mines has but one objective -- to make life miserable for the population and create economic chaos," Merrem said.

While independent military analysts discounted as propaganda many of the claims of military victories issued almost daily by the rebels' exile office in Lisbon, they said they regarded the guerrilla group as a highly motivated ground force and one that has vexed for 12 years the combined strategies of the Soviet and Cuban advisers.

Armed with U.S.-supplied Stinger missiles, Savimbi's forces have shot down a number of Soviet-made aircraft and have made Angolan airspace so precarious that Aeroflot planes taking off from as far north as Lubango climb in a tight orbit around the airport's air defense system until they reach a safe altitude.

UNITA's success in paralyzing Angola's economy and, with South Africa's help, immobilizing the Angolan Army has heightened the role of the Cuban troops and Soviet advisers here.

Angolan officials insisted -- and informed western diplomats confirmed -- that the Cubans generally have not been involved in direct combat roles for at least five years. Instead, they appear to be engaged mostly in backup and logistics activities, in air defense systems, in the protection of major military bases and the capital of Luanda and in the development of education and health services.

Angolan officials scoffed at the claim made in the United States by a Cuban Air Force general who recently defected, Rafael del Pino Diaz, that the Cubans had suffered 10,000 casualties in Angola in the past 12 years. A senior western diplomat in Luanda also said that the figure appeared to be unrealistic, given the Cubans' noncombatant role for so many years.

But the Cuban and Soviet presence here sometimes seems pervasive to a visitor.

During one four-hour period last week at Lubango's airport, a constant stream of Soviet Aeroflot transport planes landed, and their cargos, including air-to-air missiles, were quickly unloaded by Cuban and Angolan troops. U.S. intelligence sources estimated that Moscow has sent $1 billion worth of arms to Angola in the past year, bringing total Soviet military aid to $4 billion in the last decade.

Cuban and Angolan pilots chatted with one another before climbing into MiG23 fighters and taking off in pairs for what appeared to be training flights, some of them buzzing the control tower at rooftop level.

The scene at Luanda's airport was similar, with long lines of Aeroflot transport planes waiting on the taxiway for their turn to take off at intervals of only a few minutes.

A Cuban construction engineer who gave a visitor a lift in Luanda said he had served in seven countries, including Vietnam, Libya, Grenada, Nicaragua and Ethopia, fulfilling his country's "international duty," but said he looked foward to leaving Angola.

Western diplomats said they had heard reports of tensions between the Cubans and their Angolan hosts, mostly over the Cubans' better living conditions and cultural differences. But they said conflict between the governments, to the extent that it exists, stems primarily from Angolan arrears in payments for the services of Cuban civilian and military personnel and from the sporadic negotiations with the United States for a phased Cuban withdrawal.

The Cuban presence reportedly is costing Angola more than $700 million a year, although Angolan officials denied they were being charged for the expeditionary force.

Angola's stance on a phased Cuban withdrawal has alternated between a hard-line insistence that apartheid in South Africa first be ended and a more flexible position linking withdrawal to independence for the South African-administered Namibian territory and an end to South African and U.S. support for UNITA.

Vice Foreign Minister Venancio de Moura, in an interview, reiterated a 1984 Angolan offer to implement a Cuban withdrawal from the southern part of the country if Washington agreed to stop supporting UNITA and press South Africa to withdraw its troops from the border region. In exchange, Angola would pull the Cubans north of the Benguela Railway, 375 miles north of the Namibian frontier.

Criticizing what he termed U.S. "psychosis over Cubans," de Moura said, "If the problem is the Cubans, this raises the question: Doesn't the United States have diplomatic relations with countries that have Cubans in them?" He cited Ethiopia and Nicaragua as examples.

But de Moura and other Angolan officials conceded that winning U.S. diplomatic recognition is a long shot, at best, because of Savimbi's support in the United States and because the Cuban exile community in Florida, a key primary election state, has seized on Angola as an issue.

Western diplomatic analysts noted also that if President Reagan makes concessions that lead to an arms control agreement with the Soviet Union before the election, he hardly would be in a position to make concessions to another communist government in the same year.