In a historic swing to the left that could signal a reversal of this country's pro-Western policies, voters today swept the Panhellenic Socialist Movement (Pasok) into office as Greece's first socialist government.

With about 60 percent of the vote counted, Pasok had 47.7 percent of the popular vote, ample to control the 300-member Parliament under Greece's complex "reinforced proportional" representation system.

Computer analysis of the incomplete returns showed Pasok getting 173 seats to 111 seats for New Democracy and 14 seats for the Moscow-oriented Communist Party of Greece, The Associated Press reported. The analysis indicated that no other parties would gain seats.

Pasok leader Andreas Papandreou had campaigned on a platform stressing the "strategic goals" of closing down the four American military bases on Greek soil and pulling Greece out of the Atlantic Alliance. At the same time, he has made clear that a Pasok government would make no rash moves on foreign policy issues.

In Washington, a State Department spokesman said, "The United States and Greece have long been allies and we look forward to continued close relations . . . . We want to have the best relations with the Papandreou government and we intend to do what we can to foster that."

Conceding defeat to Papandreou only three hours after the polls closed, Prime Minister George Rallis of the New Democracy party said, "We are handing over . . . a strong Greece." Rallis, who said he will hand in his government's resignation to President Constantine Karamanlis Tuesday, added, "I hope the Greek people will not be sorry for their decision."

Papandreou, 62, called tonight in a victory speech for reconciliation of the political forces of the country and pledged to begin building a "new Greece."

"Change," he said, "is necessary for the survival of the Greek nation and the Greek people. I am truly proud that the option of change has been endorsed in such a democratic way by the vast majority of the Greek people . . . . We will make change tangible -- it will show its face right away and without delay. We will not lead the country into any adventure."

Papandreou has indicated that he will want to discuss with Washington the issue of control of the U.S. bases here and the economic and military aid terms for their continued operation. Negotiations on a new agreement collapsed in June as campaign pressures heated up. The talks had begun after Greece's reintegration into the North Atlantic Treaty Organization last fall.

On NATO, the socialist leader has said he would want to negotiate on the sale of military hardware to Greece to secure its eastern borders with Turkey, a key NATO member and rival of Greece.

"The United States and NATO can expect a period of tough bargaining with a socialist government in Greece," an official of one NATO country said tonight in Athens. "But it is unlikely that Papandreou will take any drastic steps on the bases or NATO membership issues immediately after assuming power."

A Pasok source tonight confirmed that the new government will make no moves on foreign policy issues, including NATO and the U.S. bases, before next spring. The government's first priorities, the source said, will be a reform of public administration and measures to combat the country's economic woes.

Papandreou has pledged to seek a referendum on Greece's continued membership in the European Community, which began in January. (Greek voters today also elected 24 representatives to the European Parliament.)

At the opposite end of the spectrum, the New Democracy platform promised continuation in NATO and the Common Market.

Papandreou, son of three-time Greek prime minister George Papandreou, is an American-educated economist with an honors degree from Harvard. His wife is American. He renounced U.S. citizenship after returning to Greece to run in national elections in his father's party.

Pasok got a boost from the victory in the spring of Francois Mitterrand's Socialists in France, and the weakening of Greece's centrist parties further augmented its influence.

As Rallis conceded in a brief speech in a downtown Athens hotel, jubilant Pasok supporters took to the streets to express their pleasure by waving flags and honking automobile horns.

The socialist victory came at the end of an election campaign that, even before the results were in, seemed to mark the beginning of a new era in Greek political life.

Greek elections traditionally have been fought on the basis of allegiances passed from generation to generation to particular political families. The Papandreou family is one, and Rallis is also a prime minister's son. But there were signs throughout the campaign that this system might be on the way out as Pasok set a style that challenged traditional mechanisms of power here.

"Pasok is a new phenomenon on the Greek political stage" one Western analyst observed. "For the first time a political party in Greece has undertaken Western-style grass-roots organization as a substitute for the traditional patron-client relationship between politicians and the people. In the past, one could predict a particular deputy would be elected in a particular district on the basis of his name alone. Now that link has broken down."

Pasok has evolved from a minority party at the time of the restoration of democracy in Greece in 1974 to a dynamic, nationally organized movement backed by the major socialist parties of Europe. This election campaign was the first since the fall of the junta in which New Democracy was not the certain winner.

Bereft of the charismatic Constantine Karamanlis, who as president of the republic is not involved in partisan politics, New Democracy ran a defensive campaign, reminding voters of its political pedigree and fending off opposition attacks on domestic and foreign policy.

"Our advantage has been in having a specific program for the future," one Pasok organizer said. "We could tell people what we plan to do about the economy, health and education, pollution. The Greeks no longer want famous names, they want action."

In contrast to the elections of 1974 and 1977, when the recent memory of the Turkish invasion of Cyprus and the seven-year military dictatorship made national security and democracy the major concerns, most Greeks today give top priority to economic and social issues.

The country's prime minister-designate first went to the United States in 1939 after being arrested as a "Trotskyite" by the right-wing dictatorship. He studied at Harvard, the University of Minnesota and Stanford and taught at Minnesota and at Berkeley.

He returned to his homeland in 1959 at the invitation of Karamanlis. He gradually became involved in his father's Center Union Party and held official posts after its victory in 1963. King Constantine and the senior Papandreou quarreled and the young monarch dismissed his prime minister. A series of political crises culminated in a military coup in 1967, and Andreas Papandreou was arrested and sent to the United States, where he again embraced the more radical politics of his youth.