SAN ANTONIO, SEPT. 13 -- Pope John Paul II visited the heart of Hispanic Texas today and virtually endorsed the Sanctuary movement that provides haven for illegal immigrants, while calling this border state a "laboratory testing America's commitment to her founding principles and human values."

Standing on a brilliantly sunny hillside to celebrate Sunday Mass for an estimated 300,000 worshipers, the pope delighted the many immigrants among them by speaking in both Spanish and English. He was sociologist and counselor, first describing the conflicts and tensions created by "the movement of people northwards" and then urging compassion for "the suffering brothers and sisters arriving from the south."

He never used the phrases undocumented immigrant or Sanctuary movement, but his context made those references clear.

As many as 11 million illegal immigrants are believed to live in the United States, and more than 1 million of them live in Texas. The Roman Catholic Church here and elsewhere has played a critical role in providing thousands of them with food and temporary shelter and helping thousands more apply for legalization under the amnesty provisions of the 1986 immigration law.

The pope called the priests, nuns and lay social workers involved in such efforts "people of great courage and generosity."

That sentiment is not universally shared in Texas. Republican Gov. Bill Clements, who greeted the pope on his arrival at Kelly Air Force Base from New Orleans this morning, has long urged the federal government to send more Border Patrol agents to the Rio Grande to seal the border with Mexico. Clements once called the amnesty act "the biggest disaster that has ever hit Texas."

But the pontiff's message was received enthusiastically at the San Antonio Mass, where the vast majority were Hispanic Texans, known as Tejanos. Some were Mexicans who flew or drove from Mexico City and Monterrey to see him.

"This pope has such a way with us," said Irene Cervantes, who arrived at the Mass site at 2 a.m. to begin her work as an usher. "They say he speaks our language well, and, you know, he speaks it both with his voice and his heart."

Despite the unrelenting sun -- 92-degree temperatures sent 500 people to Red Cross tents with heatstroke -- the Mass here was by far the largest and most festive of John Paul II's second American pilgrimage, which began in Miami last Thursday. His Miami Mass was cut short Friday by rain and lightning, and Saturday's in New Orleans was a rainsoaked affair.

San Antonio seemed to get its bad luck out of the way before the pope arrived. Last week, the specially constructed 90-foot altar collapsed under strong winds, and no one was there to be injured. Archbishop Patrick Flores of San Antonio took note of that today as he introduced the pope. "Last Thursday night, we had a bit of a tragedy," he said. "The tower collapsed, but the church of Texas is standing."

The Catholic church in Texas, much like the state, is becoming increasingly Hispanic. Tejanos make up about 60 percent of the 3.5 million Catholics, a number that does not include the church's undocumented adherents. But that is not to say that the events in San Antonio were exclusively Hispanic. Tens of thousands of Anglo Catholics traveled to the Mass from Lubbock, Houston, San Angelo, Tyler, Galveston, Austin and Dallas, and a Papal Express train brought 200 from the state's northern cities.

From the south, on the other hand, there were far fewer Mexican pilgrims than federal officials had anticipated. The U.S. Customs Service and the Border Patrol had beefed up their staffs at the El Paso, Laredo and Brownsville crossings, expecting as many as 100,000 Mexicans to come to the Mass. But by Saturday, it had become obvious that only a few thousand were making the trip.

Catholic officials in San Antonio said that a primary reason for that was that vehicle insurance laws here recently were tightened to impose a $160 fine on out-of-state drivers who are not properly insured, and most Mexican bus companies could not obtain the needed coverage.

The Vera sisters of Monterrey, Mexico -- Catalina, 31, Teresa, 21, and Isabel, 17 -- were among those who made it. "Our city was the first place he came to after he became pope in 1979," Teresa Vera said. "He stood on a bridge, and it was magical that day."

"I think he loves Mexicans because we say confession and the rosary so much," Isabel Vera said.

That he loves Mexicans is certain, but even they do not practice their religion as faithfully as this pope would like. In his speech tonight at Our Lady of Guadalupe Plaza on San Antonio's Hispanic east side, the pontiff said he thought many parishioners were too infrequent in receiving the sacraments, going to confession and praying.

The parishioners of Our Lady of Guadalupe did not take this as a scolding. Their meeting with the pope, much like another session tonight with Polish Catholics from the small Texas town of Panna Maria, was deeply emotional. Old men and women beamed with pride when the Polish pope concluded his Spanish remarks with the words:

"May God bless each and every one of you.

"May he bless every family and parish.

"May the Blessed Virgin of Guadalupe love and protect the Hispanic people of the land.

"Viva la Virgen de Guadalupe!"

The pope chose his 24-hour stop here not only to address the plight of immigrants and the church's duty to minister to Hispanics, but to address the larger issues of the poor, the homeless and the oppressed.

"The church has always proclaimed a love and preference for the poor," he told representatives of Catholic charities later at the city's civic center. "Poverty, certainly, is often a matter of material deprivation. But it is also a matter of spiritual impoverishment, the lack of human liberties and the result of any violation of human rights and human dignity."

As he has on other occasions, the pope spoke scathingly of the excesses of an affluent society and attacked the rich who fail to share their wealth with the needy and poor. He urged the reform of political institutions that "cause and perpetuate" poverty and oppression.

"As committed Catholics involved in helping to meet people's many concrete needs," he said, "you are still called to reflect on another dimension of a worldwide problem: the relationship between rich societies and poor societies, rich nations and poor nations."

The answer is not a planned society or revolution, he said, in an obvious reference to the Marxism he abhors even more than unbridled capitalism. "Force and manipulation have nothing to do with true human development and the defense of human dignity," he said. What is needed is "the conversion of hearts."

In welcoming remarks to the pope, the Rev. Thomas J. Harvey, executive director of Catholic Charities USA, raised the issue of America's poor but also went on to ask the pope's "patience" in dealing with homosexuals and other Catholics in conflict with the church.

"Where people are being exploited, we ask that you be unyielding in your cry for justice," Harvey said. "Where people are suffering from such debilitating problems as divorce, diseases such as AIDS, and the ambiguity of changing life-styles, we ask patience of the church's teachings so that we do not close the door to opportunities for better solutions to these pressures . . . than our present wisdom easily affords."

The pope did not respond to Harvey's comment but reiterated later, at Our Lady of Guadalupe, his conviction that "we cannot invent faith as we go along. We receive it in and from . . . the church to whom Christ himself has entrusted a teaching office."