Poland's Communist leadership yesterday warmly welcomed the election of Cardinal Karol Wojtyla as Pope John Paul II, saying that his selection could lead to better relations between Poland and the Vatican.

A congratulatory telegram dispatched by party chief Edward Gierek and the country's entire top leadership was clearly intended to identify the government with the jubiliation being expressed by ordinary Poles.

"This significant decision of the conclave brought great satisfaction to Poland," the cable said.

"For the first time in history a son of the Polish nation was elected to the highest post in the church. He is the son of a nation which is well-known for its love of peace and for its support of cooperation and friendship between all nations.

"We express our conviction that the election of the new pope will contribute to the further development of relations between Poland and the Vatican."

For all its effusiveness, analysts here noted that the telegram was carefully drawn, avoiding any endorsement of religion, while linking the party to what is obviously an enormous boost for Poland's national pride.

News agency reports from Poland again yesterday told of widespread rejoicing over Wojtyla's selection. Throughout the country, it was said, worshippers flocked to churches to give prayers of thanksgiving.

From Krakow, Wojtyla's archdiocese, Washington Post special correspondent Christopher Bobinski reported that more than a thousand people gathered in the city's main square last night to sing patriotic songs and religious hymns. They cheered the new pope and decorated statues with flowers and pictures of the prelate. Police stopped all vehicles from entering the square.

At a mass attended by some 5,000 people, one of the city's bishops prayed for "God to grant the church in Poland the struggle for human rights."

Bobinski described the scene as "a moving sight of national pride and self-confidence that could augur interesting developments for the future."

The choice of Wojtyla provides a major new focal point for the nationalism of Poland's people, expressed through their devotion to the church. As the scene in Krakow shows, feeling of nationalism and religion are running high.

As another gesture toward those sentiments, Kazimierz Kakol, Poland's minister in charge of religious affairs, announced that several thousand Catholic pilgrims would be flown to Rome this weekend for the pope's investiture, news agencies said.

"We will set up an air bridge between Warsaw and Rome to give the pilgrims a chance to witness this event," said Kakol, whose job it is to manage the generally strained relations between the officially athiest state and the church. "We have had numerous applications for passports and we will issue them as fast as we can."

Passport procedures in Poland normally take weeks to complete so that arranging for thousands of people to travel to Rome on such short notice would represent a significiant break with past practice.

Elsewhere in Eastern Europe, the response to the new pope was noticeably more restrained. Newspapers did, however, carry front-page reports of the news, without comment, and East German leader Erich Honecker sent a congratulatory telegram containing a hope for peace.

The departure of Wojtyla combined with the advanced age of Poland's primate, Cardinal Stefan Wyszynski, 76, poses a major question for the future of the church even in this hour of celebration. Wojtyla had been slated to succeed Wysznski and there is a vacancy in th Wroclaw archdiocese, Poland's third.

Any nomination of new cardinals, it is assumed, must be approved by the Communist leadership before being sent on to Rome for Vatican action. Diplomats here said that the government may not now approve naming other strong figures to become cardinals.

Wojtyla himself was considered an increasingly sharp critic and there had even been speculation that the party would move to block his choice as Wyszynski's successor.