Pope John Paul II assumed the mantle of the former kings of Poland today in urging his countrymen to turn political defeat into a moral victory.

After lecturing Poland's military rulers on the need for national reconciliation, the pope introduced a message of hope at the first open-air mass on his eight-day pilgrimage. Crowds estimated by church officials at more than a million crammed in and around Warsaw's May 10 Stadium to hear him summon up themes from Poland's troubled history.

The pope said "only a moral victory" could draw society out of the divisions induced by the imposition of martial law in December 1981 and restore national unity. Such a victory, he added, would be a victory "not only of the governed but at the same time of those who govern."

His speech showed his strong sense of Polish history, with one long passage devoted to the great victory of a former Polish king, Jan Sobieski, over the Turks 300 years ago at Vienna. That win saved Christian Europe from Islam.

The preoccupation with Polish national themes surprised long-time Vatican correspondents since it contrasted with the predominantly religious message he usually delivers on foreign trips. Here the pope is being received as the moral leader of the nation first and only second as head of the universal Catholic Church.

This impression of the pope as the spiritual descendant of the old Polish kings was heightened by the special triumphal arch through which he drove into the stadium. It was in the form of an eagle, Poland's national symbol, on top of which was painted a golden crown and the Black Madonna of Czestochowa, the country's holiest religious image.

The pope has pointedly referred to Gen. Wojciech Jaruzelski and other Communist Party leaders as "representatives of the highest authorities of the state" rather than as "representatives of the nation."

Cardinal John Krol of Philadelphia told reporters earlier that the pope knew he was on "a slippery tightrope."

"He cannot conceal the truth, indeed he must state it. But he must also make sure that this does not lead to an overreaction on the part of the people. He is calling for moderation as he knows that the good of the nation will not be served by political outbursts," he said.