When Greece's Prime Minister Constantine Karamanlis met President Carter at the London summit meeting of the North Atlantic Treaty Organization in May, he received a decidedly cool reception, according to insiders.

Base negotiations between the two countries were inconclusive, after having dragged on for more than two years. Greece was seeking a special status within the military wing of NATO, and continuing acrimony between Greece and Turkey had significantly damaged NATO in the eastern Mediterranean.

From London, Karamanlis went to Paris, where President Valery Giscard d'Estaing, Greeces' strongest supporter for entry into the European Common Market, told him that because of domestic pressures France was withdrawing its achieve support.

According to Greek and diplomatic sources, the two meetings figured heavily in Thursday's initialing of a new four-year Greek-American defense accord.

The agreement represents a new effort to solidify direct links with Washington, a diplomatic official said. Greece had hoped that the Common Market would provide an alternative to NATO, another means of institutionalizing itself with the democratic West. But the application for Common Market membership is running well behind schedule, and it appears that Greek hopes for early entry have been dashed.

During the Ford administration, West German Chancellor Helmut Schmidt was a channel between Karamanlis and the White House, but Karamanlis' relationship with Carter is decidedly cool. Therefore, Karamanlis' best bet if he wants Washington to act as a mediator with Turkey is a direct overture to the new administration. The base agreement is the proof.

Strongly pro-Western and convinced that only Washington can settle the problems between Greece and Turkey over Cyprus and the Aegean, Karamanlis has made the improvement of Greek-American relations one of the touchstones of his foreign policy. But sensitive public opinion and an active parliamentary opposition had previously forced him to move with caution and restraint.

Thus, the signing of Thursday's agreement, against strong political opposition, was, in the view of diplomatic observers, a clear indication of a crystallization in Greek foreign policy toward the United States.

It could also foreshadow a thaw in Greek-Turkish relations, Americans and other observers say.

The agreement reinforces the U.S. military presence in the eastern Mediterreanean, where NATO's military preparedness has suffered because of restrictions placed on the use of facilities in both Greece and Turkey over the last three years.

The 44-vessel Mediterranean Sixth Fleet is competing with a 60-ship Soviet armada, and in January the United States lost Polaris submarine facilities in Spain. Souda Bay on Crete and Hellenikon Airport outside Athens, two of fuor U.S. bases whose use was renewed in Thursday's accord, have assumed even greater importance.

Another war in the Middle East would make the facilities criticial for monitoring the expanding Soviet presence, and for U.S. reconnaissance planes that fly routinely from Greece over the Middle East.

The U.S. military presence is no less important to the government to Greece.

Since the 1974 Greek-Turkish clash over Cyprus, Greece has made major changes in the deployment of its troops, denuding the northern Yugoslav-Bulgarian border area to protect its eastern Turkish frontier.

It has received pledges from both Yugoslavia and Bulgeria on the inviolability of its borders and, according to highest sources, the Yugoslavs are eager for a military alliance with Greece.

Strengthening itself both politically and militarily for the day when 85-year-old President Tito dies, Yugoslavia was among the first to seek an explanation when Greece withdrew from the military wing of NATO in August 1974.

Greek officials claim that the new base agreement with the United States does not portend a return to NATO's military arm. Western diplomats nonetheless are hopeful that it can be viewed as a first step.

Although that step will be emphasized when Greece takes part in NATO military maneuvers next month. Defense Minister Evangelos Averoff in an interview insisted that Greece wants NATO to give it "a new status, which will permit our armed forces to be under national control in peacetime but to be integrated immediately into a unified allied command in case of war."

"We agreed to participate in the NATO exercises as an expression of our desire to collaborate with the military wing," he said. "The agreement on the bases, however, means much more a normalization of relations with America than a reapproachment with NATO today."

Averoff also said Greece was not demanding payment for U.S. use of the four key facilities covered in the bases agreement. He referred to a supplemental protocol granting Greece $700 million in U.S. aid over four years.

"This agreement is basically independent of the $700 million in aid," Averoff said. "These funds were requested only after an agreement was signed with Turkey, granting her $1 billion in [U.S.] aid. Only if the Turkish agreement is ratified are we interested in the money to maintain a balance of power here.

"If the Turkish agreement is rejected by the U.S. Congress," Averoff continued, "then I do not believe that the Greek government will ask for the $700 million, but the agreement on the bases will be valid nevertheless.

"This makes it clear that this agreement is for purposes of bilateral defense cooperation, and we do not expect to be paid."