Everything has been turned upside down," the veteran civil servant said. Now that Ethiopia has a friendship pact with the Soviet Union, "the Russians are hated, just like the Americans were hated when they were here.

"Now the Americans are popular," he said, adding with a sardonic grin: "We seem to like those who are most distant from us."

Anti-Soviet remarks are as common as poverty in the capital of this poor East African nation, but even the most vociferous private critics of the Soviet Union do not expect any major shift away soon from Moscow by the military government.

"Public opinion never counted for anything under Emperor Haile Selassie, and it doesn't affect policy now either," another disgruntled official said.

During the last year Ethiopia, the key country in the Horn of Africa, has carried out a number of subtle --and sometimes bewildering-- shifts in its foreign relations without altering its basic orientation toward the Soviet Union.

In the first half of the year, a major opening toward the West, although not the United States, appeared to be under way. East European diplomats were known to be unhappy.

Then in August, Ethiopia, Libya and South Yemen formed an alliance--the first time this ancient black African nation has ever allied itself with Arab nations, which traditionally have been regarded as key enemies.

Most diplomats trace the explanation for those moves to the deteriorating state of the Ethiopian economy. Like many other Third World countries, Ethiopia has discovered that the Soviet Union, which has provided more than $2 billion in military aid in the last four years, is not so forthcoming when it comes to development assistance.

Even though the United States is still the world's largest source of such aid, Ethiopia steadfastly has refused to turn to its former ally. On the contrary, the government launched a harsh propaganda attack on Washington last month, even indicating that it might break relations.

Ethiopia's opening to the West, particularly the Europeans, has not resulted in much aid. Relief officials say Ethiopia receives the lowest amount of aid per capita of any developing country--less than $6 a year, compared with an average of $20 per capita for Third World nations.

Italy, the former colonial power in the Ethiopian province of Eritrea, gave $44 million this year, and the European Community has pledged a four-year package of $150 million. Sweden has provided $20 million a year but is likely to cut that amount because of unhappiness with the government's treatment of the main Lutheran Church in the country.

The World Bank resumed loans last year after suspending them because of the failure of Ethiopia to compensate nationalized companies.

The United States cut off aid in 1979 over that issue and the ban continues except for food aid, which totaled about $8 million, including transportation charges, last year. Ethiopia asked for the withdrawal of Ambassador Frederick Chapin, mainly over the compensation issue, in 1980, and Washington has been represented by a charge d'affaires since then. Ethiopia has had the same level of representation in Washington since the last ambassador sought asylum three years ago.

One cardinal principle of Ethiopian foreign policy since 1977 has been that the United States, Addis Ababa's traditional arms supplier, turned its back on Ethiopia in its hour of dire need.

Ethiopia, faced with an invasion from Somalia and guerrilla wars in the north, needed arms. The United States, faced with reports of increasing human-rights violations and Ethiopia's shift toward Marxism, hesitated and even refused to deliver some arms that had been paid for.

Ethiopia then turned to the Soviet Union, which provided a cornucopia of weapons the country never will be able to pay for and thousands of Cuban troops who helped defeat the Somalis.

That has created a bond that even Ethiopians who say they despise the Soviets acknowledge.

"There is lots of wishful thinking that every Ethiopian is itching to get the Russians out," a diplomat said. "They will stomach the Russians for quite some time."

There is no question, however, that the honeymoon in Ethiopian-Soviet relations brought about by this assistance now is over. Observers here say Ethiopia wants to demonstrate that it will take aid where it can get it but intends to retain its nationalistic character.

An American-educated professor sympathetic to the government said: "The signs of Ethiopia and the Soviet Union coming closer together are not very evident."

The problems that used to be blamed on the Americans are now blamed on the Soviets, an official noted with a sense of irony.

Some Ethiopians say Moscow is unwilling to pass on technology, citing the fact that the jet engines on Ethiopia's Soviet-built fighter planes and helicopters must be sent back to the Soviet Union for servicing. Ethiopian mechanics are capable of doing the work since they serviced the military's American-built F5 jet fighters, and Ethiopian Airlines does all its own maintenance.

Others accuse East European firms of trying to palm off shoddy merchandise or make an exorbitant profit. For ideological reasons, East Germany reportedly won a bid over South Korea to provide military uniforms, then bought the uniforms from the Seoul firm for $8 each and sold them to the Ethiopians for about triple the price.

Residents say it is common, however, for Ethiopians to rebuff the Soviets, for merchants to refuse to sell them items or for parents to refuse to allow their children to play with Soviet youngsters.

For the most part, the Soviets and Cubans keep a low profile in Addis Ababa, living in separate housing projects. They are much less visible than in Angola, the other African Marxist country where there is a major Soviet-Cuban presence.

As long as Ethiopia is concerned about the possibility of a Somali invasion from the east and guerrilla warfare in the north, it will be dependent on the 11,000 Cuban troops and approximately 1,500 Soviet civilian and military advisers.

Aside from weapons, Moscow provides one other key element of assistance: oil, at a preferential price of about $28 to $30 a barrel. But the amount satisfies only about 70 percent of Ethiopia's needs and is provided on the basis of a one-year contract, forcing regular appeals to the Kremlin.

Soviet development aid is limited to plans for a 25,000-acre cotton project, a hydroelectric dam and a cement plant. Work has not started on any of the projects and some have been planned for years.

The chairman of the ruling military council, Mengistu Haile-Mariam, was unhappy at the amount of Soviet aid proffered during a visit to Moscow in November 1980, which set the stage for the pact with Libya. Ever since the treaty was signed in August there have been rumors that Libya would provide Ethiopia with $1 billion in assistance and that more than 20,000 Ethiopian troops may be sent to Libya.

Informed sources discount both rumors, but there are persistent reports that Ethiopia already has received up to $150 million. Foreign Minister Feleke Wolde-Giorgis will only say that the two countries will cooperate on joint projects. One is believed to be a sugar refinery.

It is unlikely, however, that the relationship will be smooth between the radical Arab government of Col. Muammar Qaddafi and Ethiopia, with its centuries of hostility toward the Arab world.

Qaddafi offended many Ethiopians when he visited in August and made a political speech at the main mosque during Friday prayers. Also, some Ethiopians privately express embarrassment at being an ally of a government led by Qaddafi, whom they view as a "madman."

U.S.-Ethiopian relations are complicated by Washington's global concerns, mainly the worries about the presence of Cuban troops and the desire to use military facilities at Somalia's port of Berbera, less than 100 miles from the Ethiopian border.

U.S. military maneuvers there last month led to protests from Ethiopia and the implied threat to break relations.

Sixteen months ago the United States agreed to provide Somalia with $40 million in defensive weapons in return for use of Berbera, but no materiel has been delivered.

The U.S. hesitation is part of an American effort to keep a foot in the door in Ethiopia while still using the same facilities.

Feleke has called the relationship cold. He said any change will require time and patience.

Feleke clearly demonstrated his attitude toward the United States in an interview last month.

The former government of Emperor Haile Selassie, he said, "had 30 years of traditional relations with the United States. You can go around Ethiopia and find what the United States has done to the Ethiopian people. Are there any schools in Ethiopia built by the United States? Any hospitals or roads? Clinics? Anything humanitarian in the 30 years? Nothing."

The United States maintained its largest aid program in Africa in this country during that period. U.S. Embassy officials said $325 million was provided between 1957 and 1978, mostly for food, airport and road construction and establishment of the country's first university and regional colleges, plus $250 million in military assistance.

When told of Feleke's remarks, several Ethiopians expressed annoyance and provided numerous examples of U.S. assistance.

"There's no need to distort the past," said one official who strongly supports the government. "He should just stick to politics."