Greek Prime Minister Andreas Papandreou opened a political rift in NATO today by demanding a formal pledge that the rest of the alliance would protect Greece from attack by neighboring Turkey, a fellow NATO member.

When Papandreou failed to receive the assurances he sought in a communique at the end of a semi-annual meeting of North Atlantic Treaty Organization defense ministers here, the newly elected Greek leader blocked publication of the communique -- an unprecedented action that NATO Secretary General Joseph Luns said was regretted by himself and "certain members of the alliance."

Papandreou's Panhellenic Socialist Movement won power in October following a campaign in which the Greek leader hinted strongly at a pullout from the NATO command along the lines of that by France 15 years ago. He charged that membership under current conditions failed to serve Greek interests.

Luns said Papandreou, who is also his country's defense minister, had made "a very strong demand" that today's communique include "a formula that would give to himself, his government and the Greek people assurance that the eastern frontiers of Greece would be protected against aggression" by Turkey.

Despite what Luns called "convincing" assurances by Turkish Defense Minister Umit Haluk Bayulken that "it was inconceivable that any country in the alliance could pose a threat to another," several attempts were made to draft the language for a clause "to meet the Greek preoccupations" without offending Turkey, said the secretary general.

Luns said the Turkish defense minister agreed to wording devised by Luns, defense ministers and NATO ambassadors of Italy, Norway and Britain, but Papandreou rejected it after consulting with advisers. Luns said Papandreou, rejecting entreaties from Luns and other NATO ministers, then refused to allow the communique to be formally published or its contents to be distributed to the press as an unofficial document. Luns instead gave reporters an unusual briefing during which he read its entire contents, dealing with routine NATO issues facing the defense ministers, but leaving out the compromise language Papandreou rejected.

According to a copy of the communique later obtained by reporters, this clause would have said: " The NATO defense ministers noted that current international tensions have enhanced the importance of maintaining stability, strength and territorial integrity of all members of the alliance. They expressed the hope that Greece and Turkey can carry on the negotiating process they had initiated in 1976 to resolve the pending issues between them. They stressed the need for continuing allied solidarity and support for all members as may be required by the particular security interests of each of these countries in accordance with the NATO charter."

Relations between Greece and Turkey have been strained since the Turkish invasion of Cyprus in 1974. Greece had withdrawn from the NATO military command structure to protest the invasion and rejoined only last year under an agreement reached between Greece's previous government and Gen. Bernard Rogers, the NATO commander, to meet Turkish concerns. It set up negotiations not yet completed between Greece and Turkey for their sharing of military control of air space over the Aegean Sea between them, one of several unresolved issues left by the Cyprus invasion.

Papandreou caused a stir here yesterday by telling reporters his government is observing "a partial suspension" of the Rogers agreement and seeking to maintain the sole control of the Aegean air space that Greece had before withdrawing from the NATO command in 1974. He has particularly emphasized the military threat he has said Turkey poses to Greece and a Greek need for greater financial and military assistance. However, according to U.S. and European diplomats, Papandreou has generally not been as outspoken at this week's NATO meeting and a Common Market summit two weeks ago as in public speeches and press conferences apparently directed in part to his home audience.

Except for his demand for a formal assurance of NATO protection of Greece against Turkey, which sources said has caused considerable consternation among some European defense ministers and diplomats, American sources here said Papandreou did not ask for anything like renegotiation of the alliance agreement covering Greek participation in the NATO command or say, as he told reporters, that a "process of disengagement is underway."

"We think we can work our way through this," said one senior U.S. source. He added, however, that Papandreou may pursue his concern about Turkey at the semiannual meeting of NATO foreign ministers that begins here Thursday. Luns said both Papandreou and the Turkish defense minister indicated late today a willingness for their governments to pursue bilateral contacts to discuss their differences.

"Papandreou does not want to get out of NATO or the Common Market or move away from the U.S.," said another American official, "but he wants to put on the maximum pressure he can to show what he can get for Greece. He will be Peck's bad boy and play it to the hilt.

While some European governments are more sympathetic to Papandreou's concerns about Turkey, they appear to be no more willing than the United States to give significant ground to his demands.