The meeting of nonaligned countries in Havana this week mocks a principal foreign-policy claim of the Carter administration. That is the claim to have advanced American interests by improving ties with the underdeveloped countries of the southern continents -- the so-called Third World.

Actually, in dealing with Third World countries, the Carter administration has repeatedly given much away and received, by way of thanks, the wet mitten. As a result, as the Havana meeting shows, leadership in the Third World has been drifting toward countries hostile to the American interest.

Nigeria is the country usually cited as a spectacular example of the administration's success in the Third World. President Carter never ceases to relate that he visited that country at the end of 1977 while Henry Kissinger was refused entry only the year before.

What President Carter doesn't point out is that his administration bought, in every respect, the Nigerian program for black domination of southern Africa. He also neglects to mention that the Nigerians, far from helping the United States to meet its policy objectives, have used their most important international asset to hurt this country where it lives. They have led the way in forcing up international oil prices.

Mexico provides another key test. President Carter has bent over backwards to avoid confrontation with our neighbor to the south. The Carter administration has turned a blind eye to illegal border crossings. It has avoided the application of restrictive measures against the dumping of Mexican tomatoes. Carter himself, on his visit to Mexico City last February, stood mute and inglorious while President Jose Lopez Portillo assailed the United States for deception in negotiating a natural-gas deal.

In return, the Mexicans have been holding out in the gas talks for a price (about $4 per thousand cubic feet) way above the price (less than $3) being asked by Canada. When an American negotiator intimated the United States might want to charge Mexico for the damages done to the Texas coast by the huge oil spill in the Bay of Campeche, Lopez Portillo threatened to call off the gas talks altogether.

Then there is the case of Vietnam. The Carter administration courted Hanoi in an almost desperate fashion when it came to power, and nearly opened diplomatic relations, That solicitude has earned from Hanoi a tightened alliance with Moscow, the invasion of Cambodia and the wholesale expulsion of ethnic Chinese from the country. Most recently, Hanoi has used American concern for the boat people to win U.S. approval of an arrangement whereby the Vietnamese keep in their country the thousands of people who want to leave it.

Those salient cases add up to a general pattern. All across the Third World, countries have been accepting American policy concessions as something due, and then raising their demands. The word is out that nobody has to pay for crossing Washington.

A converse pattern has also been at work in such countries as Iran, Jordan, Morocco, Nicaragua and South Korea. The Carter administration has been systematically cold-shouldering, as right-wing dictatorships, governments once on friendly terms with Washington. So not only do countries at odds with the United States go unpunished. Friends go unrewarded.

Inevitably in these conditions, countries hostile to the United States and backed by Russia tend to rise to the top of the international pile. The nonaligned bloc provides a striking case in point.

Not long ago, that roost was ruled by countries genuinely neutral as between Washington and Moscow. Yugoslavia, for example, and India. Now, Cuba leads the bloc, and countries such as Vietnam, Iraq and Algeria, have moved to the fore. Not surprisingly, the Havana conference has on the agenda resolutions that would approve the Cuban presence in Africa, legitimize the Vietnamese attack on Cambodia and denounce the American-sponsored peace treaty between Egypt and Israel,

For the fact is that the United States has material and political interests that clash with those of the nations of the Third World. If indiscriminate hostility only hardens their opposition, indiscriminate courtship only obscures the interest. In each case, the United States paints itself into a corner. So the right policy is to recognize the difference of interests and maneuver in ways that at least prevent the making up of a monolithic anti-American bloc.