The Greek election was a triumph for Prime Minister Andreas Papandreou and his Panhellenic Socialist Movement. Whatever the exasperations that the erratic Mr. Papandreou imposes on other countries that are Greece's friends and allies, this outcome is probably preferable to others that, until the ballots were counted, seemed more likely.

He has won nearly as many votes as in the 1981 sweep that first brought him to power, and the Socialists will retain an absolute majority in the parliament. You don't have to be an admirer of Mr. Papandreou to consider that at least better than a weakened Socialist government dependent on Greece's Stalinist Communists. Or, equally unpromising, results so narrowly divided that no one could form a durable government.

Mr. Papandreou and his party have completed their full term -- the first time in Greece's modern history that a government of the left has accomplished that feat -- and have now won another. The quality of their governance has not been high, and yet the contribution to democratic tradition is significant. They have established the principle of orderly alternation under the law.

But they have done it at some substantial cost to Greece's standing among its neighbors. Mr. Papandreou has talked from time to time about pulling Greece out of NATO, or out of the Common Market; he hasn't actually done it, but he uses the suggestion to try to increase his bargaining power. The Common Market in particular, with its rule of unanimity, is made to order for this kind of hold-up. One of the ironies of this election is that the Common Market's fat subsidies to Greek agriculture were very helpful to the Socialists.

Another use of a flamboyant and abrasive foreign policy is to deflect criticism of poor economic performance. By far the poorest of the Common Market countries -- at least until next winter, when Portugal joins -- Greece is having trouble coping with the dual benefits and threats of competition in, and from, a market dominated by the powerful economies to the northwest.

Mr. Papandreou's attacks on the Common Market have clearly struck a resonance among Greeks who resent the Western Europeans' prosperity and success. But his style of needling and obstruction is not really very helpful to a small country with few resources that wants to follow the same road to wealth. It's also true that his constant evocation of leftist positions, often more extreme than any he actually adopts, is deeply divisive in a country that went through a civil war within the memory of most adult Greeks.