Greek Prime Minister Andreas Papandreou has dismayed and puzzled western diplomats in Athens by praising Polish leader Gen. Wojciech Jaruzelski and criticizing the banned Solidarity trade union, at the end of an official visit to Warsaw this week.

Papandreou told Greek reporters aboard his plane returning from Warsaw Wednesday night, that Jaruzelski is "a patriot" who is "doing everything humanly possible" to bring about reforms in Poland.

"Just because Jaruzelski wears a military uniform, we shouldn't be misled into thinking this is a military regime," Papandreou said. Solidarity, he added, is a "revolutionary movement" that caused "backsliding" in Poland because it failed to gauge correctly "when to act, and how."

"That's my assessment of Solidarity, unfortunately," Papandreou said.

A joint communique issued after Papandreou's three days of talks with Jaruzelski said the Polish leader had accepted an invitation to visit Athens, but that no firm date had been set. The communique said the two sides had "converging, or identical views" on current international problems.

Athens has tried to defuse western criticism of Papandreou's Poland visit, the first by a NATO leader since martial law was declared in 1981, by emphasizing that it is part of a general thaw in relations between Warsaw and West European countries. Senior British, West German, Italian and Austrian ministers plan to visit Poland this year, responding to last July's amnesty for political prisoners. In his statements to Greek journalists, Papandreou attributed western economic sanctions against Poland to "the goals of the U.S., which aim at destablizing the political structure of East Bloc countries."

"I haven't seen the U.S. isolate Turkey because it executes, tortures and imprisons. When the U.S. does that it will have credibility," Papandreou said.

NATO and European Community diplomats in Athens indicated today that the Greek prime minister's statements have once more contradicted general western policy, as happened in 1981, when Greece was the only West European country to reject sanctions against the Polish military regime.

State Department spokesman John Hughes said in Washington that Papandreou had "put himself in opposition to the views of the Polish people, the Catholic Church and trade unions throughout the world."

Hughes said the United States had "reacted strongly against the imposition of martial law and the subsequent outlawing of Solidarity. U.S. policy toward Poland was then and continues to be designed to encourage genuine national reconciliation between the government and people. No mediation is required."

A diplomat here said Papandreou's remarks "are very strange. They go beyond anything he has ever said on East-West issues. It's not good."

Papandreou's statements on Poland have added to the puzzlement in most western embassies here, in trying to interpret the prime minister's increasingly pro-Soviet foreign policy line.

"The standard explanations are all wearing thin," one NATO diplomat said. Many European Community and NATO diplomats in Athens say that until the spring of 1983, the prevailing view was that Papandreou engaged in anti-West rhetoric to counterbalance the signing of an agreement with Washington for the operation of the U.S. military bases in Greece, as well as the fact that he had not acted immediately to fulfill pledges made before his 1981 election victory to pull out of NATO and the European Community.

It was assumed that the prime minister was playing to a radical domestic gallery of Socialist hard-liners, and to the Moscow-line Communist opposition, who command only about 11 percent of the vote but wield considerable power in trade unions.

Many diplomats say this theory began to crumble in May 1983, when, during a speech to the Socialist party congress, Papandreou praised the Soviet Union as an agent of detente and castigated the United States as an imperialist, expansionist power.

Diplomats say that several statements made by Papandreou in recent weeks, taken with the congress speech, have had a "numbing" effect. In early October, Papandreou told Socialist parliament deputies that the South Korean airliner shot down by the Soviet Union last year was on a spying mission for the CIA. Last week, just before his visit to Poland, the Greek premier told journalists in Stockholm who invited him to compare the American with the Soviet threat to peace, that he believes the public in the United States does not live in great fear of a Soviet nuclear attack, while the reverse is the case in the Soviet Union.

"I no longer believe Papandreou gains votes in Greece by saying this sort of thing. It raises questions," one western diplomat said.