GDANSK, POLAND, JUNE 11 -- Pope John Paul II met here today with Solidarity leader Lech Walesa and pronounced a ringing defense of the suppressed trade union's ideals, declaring that "the world cannot forget it."

In his first trip as pope to the coastal cities where Solidarity was born after a series of strikes in August 1980, the pope said in a meeting with hundreds of thousands of seamen in neighboring Gdynia that Poland has given "a new meaning" to the word solidarity, one of "eternal significance."

"In the name of the future of mankind and of humanity, the word 'solidarity' must be pronounced," the pope said, speaking from a towering makeshift altar set up near the harbor's leaden-colored waters. "This word was uttered right here, in a new way and in a new context. And the world cannot forget it. This word is your pride, Polish seamen."

The pontiff's exposition of Solidarity's message of unity and nonviolence was one of the strongest endorsements he has ever offered the Polish opposition movement and appeared likely to raise new tensions with the government of Gen. Wojciech Jaruzelski.

The pope's message was repeatedly applauded by the huge audience, even though John Paul once had to ask the crowd not to interrupt until he finished because "it is so important and significant."

Following the speech, John Paul traveled to Gdansk and received Walesa for 40 minutes at the bishop's official residence here. The 43-year-old union chairman attended with his wife, Danuta, and eight children and presented the pope with a leather-bound, French-language copy of his recently published autobiography.

He later said the meeting was "great" and that he had told the pope everything he had wanted to say.

"I'm very happy," Walesa said of the pope's speech as he left his apartment. "Now even a fool can understand that finding a passage in this labyrinth. . .requires solidarity. This is the only road."

The pope's speech was not immediately broadcast on television in an evident signal of government displeasure. All of the pope's previous outdoor appearances have been covered in full by state television.

Already this week, the pope has called for a rethinking of the premises of Poland's communist system and for the implementation of the agreements under which the farmers' union Rural Solidarity was established.

Earlier today, at an outdoor mass in the port of Szczecin on the East German border, the pope specifically recalled the agreements signed there in 1980 by Solidarity and the Polish government. The Szczecin agreements promised formal legal recognition for Solidarity, which had just been formed at the Lenin shipyard in nearby Gdansk.

Friday afternoon, the pope is due to celebrate an open-air mass in an area only two blocks from the gray concrete high-rise apartment building where Walesa lives. Solidarity activists said here today that senior leaders of the union were assembling from around the country to participate in the event.

Police detained about 40 opposition activists in Gdansk and set up roadblocks around the city before the pope's arrival. Thousands of militia and special militarized units were brought by truck and train from other parts of Poland and quartered in huge tent cities set up on vacant fields and parking lots.

In Gdynia today, police sharpshooters were posted on all of the apartment block rooftops overlooking Kosciuszko Square, where the pope spoke against a backdrop of bobbing ships at anchor in the port. The city was sealed off hours before the pope's arrival in a continuation of the rigid security procedures that have prevailed since his arrival in Poland on Monday.

Everywhere the pope went today he was greeted by excited crowds of people who waved yellow and white Vatican flags, applauded and chanted, "Long live the pope." Solidarity banners were unfurled at the pope's outdoor appearances, as they have been on every day so far of his seven-day tour.

The longest rounds of applause came, not surprisingly, at each of his nine evocations of the name Solidarity, especially when he departed from his prepared text to ask rhetorically, "What is solidarity?"

"It is a way of living in unity with a full respect for the differences that occur among people," the white-haired pontiff said as a breeze off the harbor ruffled the crimson cloak he wore. "That is solidarity, that is pluralism."

"I felt it was my duty to tell you this, to make this basic analysis," he continued. "Even if this pope were not a Pole, I'm sure he would tell you the same thing because it is so very important."

Walesa worked his regular shift as an electrician at the Lenin shipyard from 6 a.m. until 2 p.m. today before returning to his home to await the special security guards who escorted the Walesa family to the bishop's residence, where the pope is staying here.

The union leader had told reporters that "the most important thing I want to say to the pope is about pluralism, the necessity of pluralism in Poland. Without it, Poland won't make it."

Walesa met with the pope in Rome in 1981 and again in 1983 during the pope's second pilgrimage here. Asked to compare the last two meetings, he said, "I was sure of victory then, when I was interned, and now. We will not change our ways."