On a mission of healing and hope to his native Poland, Pope John Paul II received an enthusiastic welcome from anxious crowds today and described his homeland as a place that "has suffered much and ever suffers anew."

Beginning a difficult second pilgrimage home as pope, he struck a commiserating note with a country still feeling the punishing effects of the military rule imposed 18 months ago. In veiled terms, the pontiff recalled the repressions of the Stalinist era, drawing a parallel to the past that was clearly uncomfortable for the government led by Gen. Wojciech Jaruzelski.

As the pope was driven from the airport early this evening to a mass at the Cathedral of St. John the Baptist, Solidarity chants boomed from the enormous crowd that packed Castle Square in Warsaw's reconstructed Old Town.

The crowd's recalling of the now-banned Solidarity trade union no doubt deepened government concerns that the pilgrimage by Poland's most popular living native could unleash a new wave of social unrest and antigovernment demonstrations.

As the pope retired for the night to the primate's residence, tens of thousands of people marched through downtown Warsaw in a pro-Solidarity rally that police steered away from Communist Party headquarters and allowed to break up peaceably.

Trying to dissuade Poles from joining expected protest actions, officials have suggested that if the eight-day papal tour goes without major disturbances, this would improve chances for a lifting soon of the final aspects of martial law.

In his airport remarks, John Paul included an appeal to all participating in his pilgrimage to observe peace. But the thrust of his statement was clearly directed at those who have borne the brunt of the government's crackdown against Solidarity.

"Poland's history has not been easy, especially over the course of these last centuries," the pope said. "She is a mother who has suffered much and who ever suffers anew.

"I myself am not able to visit all the sick, the imprisoned, the suffering," he went on, in a reference to jailed Solidarity activists, among others. "But I ask them to be close to me in spirit, to sustain me as they always do. I receive many letters that bear witness to this, especially in this recent period."

Tonight, in his first homily, he returned to this theme, speaking of his "compatriots . . . deprived of their freedom" and of "the sad events" of Dec. 13, the date martial law was imposed in 1981.

The pope's personal appeal for an end to martial law--it was suspended last December--and a blanket amnesty for political prisoners before his arrival was rejected by the government, which said active opposition forces and a weak economy required continuing some elements of military rule.

But John Paul's first comments appeared to signal that during his visit he will not shy from raising his concerns about continuing human rights violations in Poland.

Leading the government's welcoming delegation at the airport was Poland's figurehead president, Henryk Jablonski, who called the papal trip "proof of the far-advanced normalization of life in this country." He said the visit was also important in strengthening "agreement and cooperation" in the country and fostering closer church-state cooperation, which is a main priority for Jaruzelski's government.

As the Italian airliner carrying the pope touched down at Warsaw's airport late this afternoon, bells pealed throughout this Communist capital. Many of the reservations and worries people had about the political timing of the visit appeared to give way in a surge of excitement and enthusiasm once John Paul actually stepped onto Polish soil.

Riding in his bubble-top "popemobile" on a 10-mile route into the city, the pontiff passed banners that he easily could read. "Welcome, messenger of hope," said a yellow sign stretched above an intersection near the U.S. Embassy. Down the road, draped on a church, was another that announced: "I came, I saw, God conquered."

In the next week the pope is scheduled to travel to several of the largest cities in western and southern Poland, in contrast to his last visit in 1979, which focused on rural locales and kept John Paul away from the main concentrations of workers. The different focus this time is not by chance, church officials say, given the worker unrest of the past few years.

As a vehicle for addressing current themes of resistance, suffering, charity and faith in Polish life, the pope also is expected to beatify three Poles whose backgrounds offer models along these lines.

In his first homily, at a memorial service in St. John's Cathedral for Poland's late primate, Cardinal Stefan Wyszynski, the pope proved himself deft at speaking indirectly about the currently strained situation in his homeland.

He recalled the specter of Stalinist times, for instance, by quoting a passage from Wyszynski's diaries during the time the late cardinal was imprisoned in the mid-1950s.

In the same sermon, the pope identified with the present-day suffering of Poles. "Together with all my compatriots," he said, "especially with those who are most acutely tasting the bitterness of disappointment, humiliation, suffering, of being deprived of their freedom, of being wronged, of having their dignity trampled upon, I stand beneath the cross of Christ . . . ."

Before he could finish, the congregation of bishops and invited worshipers in the cathedral broke into applause. They clapped again later when the pope, after praising Wyszynski as "a free man" who "taught us, his compatriots, true freedom," made passing reference to the imposition of martial law six months after Wyszynski's death.

"Divine providence spared him the sad events associated with the date of Dec. 13," said the pontiff who, as the former bishop Karol Wojtyla of Krakow, had known the Polish primate well.

As head of the Polish church from the time the Communists assumed power in 1948, Wyszynski was a dominant figure in Poland for several decades. Defending the church, he shifted from outright opposition to the government during Stalinist times to peaceful coexistence and, at times, cooperation with the authorities as they moderated their own positions.

No reasons were ever officially given for his three-year detention beginning in 1953 during the dark days of Stalinism. But by the time of Wyszynski's death, Polish authorities were paying tribute to him as though he had always been officially celebrated.

The pope's visit is taking place at a high point in Polish church-state relations, marked by the sanctioned construction of many parish churches, a big jump in the circulation of Catholic papers and the broadcasting of a Sunday mass on the officially controlled radio--gains made chiefly in the past few years since John Paul's last visit and the short-lived appearance of the Solidarity movement.

Whether the pope can help consolidate these new-won privileges is one of the challenges of his pilgrimage. Joking with his audience as he left the cathedral this evening, John Paul quipped: "This is God's logic: Let them be more merciful to me so that I can be more merciful to them."