ABU DHABI, United Arab Emirates — The opulence of Abu Dhabi is not subtle.

Bentleys line the roads, glass skyscrapers rise like blades over corporate business parks, a multibillion dollar hotel once used jewels as ornaments, and the presidential palace gleams with marble and sparkles with crystal chandeliers.

But valeting those cars, cleaning those hotel rooms, servicing those high-rise elevators and preparing watermelon appetizers for guests in the presidential palace are millions of migrants, many of whom are Catholics from India, the Philippines and South America.

On Tuesday, the last day of his 40-hour visit to the United Arab Emirates, Pope Francis came to speak to them directly.

“I have goose bumps,” said Khristina Garcia, a 32-year-old emergency room nurse from the Philippines who has lived in Abu Dhabi for five years. She was one of the roughly 135,000 Catholics, many of whom had received a state-sanctioned day off work, who filled the stands and surrounded Zayed Sports City Stadium on a warm and bright Tuesday afternoon. “I feel blessed,” she said.

The Mass, which was also attended by 4,000 Muslims in keeping with the visit’s emphasis on interreligious dialogue, was the largest public celebration of a Christian rite in the history of the Muslim country, where the worship of other faiths is tolerated, but only in private under normal circumstances.

Inside the stadium, tens of thousands of faithful clad in white hats bearing the trip’s emblem of a dove applauded as Francis rode around in his Popemobile.

The crowd at the Mass represented the asylum seekers and economic migrants Francis has spent years defending, but with a twist.

“It is most certainly not easy for you to live far from home, missing the affection of your loved ones, and perhaps also feeling uncertainty about the future,” Francis said in his homily, which he delivered in Italian. “But the Lord is faithful and does not abandon his people.”

He sought to encourage the Christians here in their lives and faith, assuring them that if they continued on, the Lord would provide a way forward. “He can even open paths in the desert,” the pope said.

“I have also come to say thank you for the way in which you live the Gospel,” he said, telling the crowd “of numerous nations, languages and rites” that their church here “bears a likeness” to the biblical Philadelphia, the city of brotherly love, in that they went forward “even in the midst of difficulties.”

Although the United Arab Emirates attracts non-Muslim migrants with the promise of economic opportunity, life in the country can be difficult: Many work in jobs with scant labor protections, the Emirates rarely bestows citizenship on them, and they are often under the threat of being sent home.

The leaders of the Emirates, where members of minority religions are prohibited from professing their faith on the media or in public, have sought to emphasize their openness to other faiths, declaring 2019 as “The Year of Tolerance” and sending its minister of tolerance to Tuesday’s Mass.

“That is why we are hosting this historical visit,” said Thani Ahmed al-Zeyoudi, the country’s minister of climate change and the environment. “To send a message that the U.A.E. model can be replicated anywhere around the world.”

Critics suspect that the country’s tolerance masks an ulterior motive of attracting labor and improving the business climate.