WARSAW, JUNE 15 -- A powerful defense by Pope John Paul II of the leaders and ideals of the banned Solidarity trade union during a week-long visit here has created a new mandate for politically oriented activity by the Polish Catholic Church and may have clouded the prospects of improved relations between the Vatican and the East Bloc.

In a tour through nine cities that reached its emotional high point at Solidarity's birthplace in Gdansk, the Polish-born pontiff indicated that the Roman Catholic Church under his guidance is ready for "new solutions" in its relationship with communist-ruled nations under the influence of Soviet leader Mikhail Gorbachev.

At the same time, he made clear that the church in Poland and elsewhere must make the struggle for human rights and political pluralism its first priority, ensuring that any accommodation with communism is "credible for the nation."

Furthermore, the pope described the nonviolent Solidarity movement as a model of how resistance to oppression and the struggle for "human liberation" should be carried out in the modern world, both in and outside the church. Solidarity's goals and tactics, he insisted, should be embraced by the church as its own.

That strongly worded message seemed to define a Vatican attitude toward Gorbachev's emerging leadership that is open to conciliation but rigid in its demands for political and social change. To reach an accommodation with the church, John Paul seemed to be saying, communist rulers in Warsaw and Moscow must come to terms with movements like Solidarity.

As Polish leader Gen. Wojciech Jaruzelski bluntly made clear when the pope departed yesterday, the communists may find the Vatican stance more provocative than encouraging. "We have our own road" to "renewal, democratization, reforms," the general said. To say that the road lay with Solidarity, he implied, was "an alien manipulation" of the truth.

Despite the bitter feelings evident in Jaruzelski's remarks, Polish church officials and lay activists say some stabilization of ties between church and state here, including the landmark establishment of diplomatic relations between Warsaw and the Vatican, remains a real possibility.

The pope said yesterday that the Polish church favored the opening of the link, which would be the first between the Vatican and a Soviet Bloc country. Jaruzelski restated his government's offer of "constructive relations" with the church.

Nevertheless, John Paul has given the Polish hierarchy and its relatively conservative primate, Cardinal Jozef Glemp, a charge of struggling for political rights that will inevitably raise tensions in church-state relations if it is carried out.

"The pope has given the Polish bishops a tremendous challenge," said Krzysztof Sliwinski, a prominent Catholic editor and activist. "He has created a whole new dimension of work for all of us. The problem now is whether we will have the strength to fill that role."

For Solidarity's remaining organization in Poland, John Paul's words and the huge pro-Solidarity crowd that assembled to hear them in Gdansk served as a badly needed validation that the movement still exists and carries on a struggle worthy of support.

The papal endorsement may lead to a modest burst of public enthusiasm for opposition activity and firm up lagging support from abroad, union leaders said. Yet at the same time, Solidarity's organizers can only be sobered by the relative passivity with which crowds outside of Gdansk greeted the pope and his message.

"If no one had turned up in Gdansk, Solidarity would have been dead and buried," said a top movement leader last night. "Now, we've proved we're alive, but we have a lot of work to do. We have to change, adapt to the new situation."

Above all, the pope's trip may revitalize ties between Solidarity and the Polish church, activists said. Although it has sheltered Solidarity groups and independent cultural activity and defended Solidarity's goals since 1981, the ties between church and opposition have appeared to gradually weaken under the pressure of the government and the cautious leadership of Glemp.

In recent years Jaruzelski's government has hammered away at such issues as the open support of militant priests for Solidarity groups and the church's support for banned artists, writers, and other intellectuals, and the hierarchy has gradually made some concessions. But the pope specifically and unequivocally endorsed these activities here and called on Glemp and his church to "respond fully to the trust of these men and women."

As a result, the senior Solidarity strategist said, "we could now see even a partial secularization of Solidarity, at least in the short term."

Many opposition activists doubt that the hierarchy under Glemp will aggressively follow up on the pope's message, however. In the near future, they say, both church and state will continue to have strong motives to increase cooperation.

For the local hierarchy, accommodation with Jaruzelski could mean the granting of full legal status to the church in Poland for the first time under communist rule and the return of some church charity institutions. That step has long been linked in negotiations with the opening of the diplomatic link between the Vatican and Warsaw.

Jaruzelski needs good relations with the church to keep his unpopular government firmly in control and develop slowly improving political and economic ties with western states. If diplomatic ties are established, Poland could also aspire to a role as a link -- even mediator -- between Moscow and the Vatican.

The pope clearly continues to be interested in reconstructing and modernizing the relationship between Catholics and communists. Twice during his visit here he spoke of a softening of the contradictions between Marxist ideology and Catholicism.

And yet, the pope told a cheering audience in Gdynia, "I felt it was my duty to tell you this, to make this basic analysis" of Solidarity, regardless of the consequences. "Even if this pope were not a Pole, I'm sure he would tell you the same thing -- because it is so very important."