AROUND THE green-felt-covered Kremlin table where the Soviet Politburo meets, surely somebody is now asking darkly, "Who lost Somalia?" The wipeout of its entire decade-long, multimillion-dollar investment in a political and military lodgment in that strategic corner of the Horn of Africa will unquestionably ricochet in Moscow a long time.Why, someone will query, do we keep taking fliers in these wretched, unstable and ungrateful Third World nations? Why, a second comrade will ask, did we jeopardize our Somali position by simultaneously arming the very nation (Ethipia) that Somalia, with our arms, was trying to dismember? A third may offer: How can we win? We come to the aid of an invaded country, we affirm the principle that African borders should not be changed by force, and yet the Americans as well as the Africans give us the back of their hand.

Well, tough break, Ivan; sometimes history goes your way and sometimes not. In 18 months, two of only six friendship-and-cooperation treaties Moscow has in the Third World have been denounced - the other by Egypt. By attempting to play both sides in Somalia and Ethiopia, the Russians lost the one without the assurance of gaining anything more than further expense and frustration in the other. The Soviet plan to wrap a whole group of states on either side of the Red Sea into a "socialist federation" crashed ignominiously on the double reef of conflicting African ethnic nationalisms and Arab and Western diplomacy. The relevant question is not who lost Somalia - almost all poor new countries in turmoil are capable of such flip-flops - but why it took so long.

Rather than gloat and leap in after the Russians, the United States is trying to show that, just as it says, it does not regard Africa as a great-power chessboard. Washington has turned away Somalia's latest request for arms - even though Ethiopia, with Soviet weapons, may well end up rolling Somali forces out of the Ethiopian region (populated by many ethnic Somalis) they now hold. The Somalis will have to look elsewhere. The administration's example of restraint is smart and opens up diplomatic possibilities otherwise closed. There is no better way to show that this country means what it says: that African problems must be solved by Africans.