ROME — In a daylong visit to Latvia on Monday, Pope Francis recalled the past suffering of Latvians, who preserved their faith during decades of Nazi and Soviet occupation, even as he cautioned against the return of isolationist sentiments that are re-emerging throughout Europe.

“Sometimes we see a return to ways of thinking that would have us be suspicious of others, or would show us with statistics that we would be better off, more prosperous and more secure just by ourselves,” the pope said during a Mass at the Basilica of the Assumption in the southeastern city of Aglona.

In those moments, the pope said, the Virgin Mary invites “us to ‘receive’ our brothers and sisters, to care for them, in a spirit of universal fraternity.”

Thousands of faithful attended the rain-drenched Mass at Latvia’s most important Catholic shrine, a highly anticipated event in a four-day trip to the Baltics. The basilica’s venerated icon of the Mother of God was moved outdoors for the event, which was held in a square created when Pope John Paul II visited Aglona in 1993, when Latvia was a fledgling republic.