Updated

Pope Francis ended his pilgrimage to the Baltics on Tuesday in secular Estonia, warning that "existential ennui" can creep in when societies put their faith in technological progress alone.

Estonia is considered both one of the most tech-advanced countries in Europe and one of the least religious societies in the world. More than half of Estonia's 1.3 million people profess no religious affiliation. The Lutheran and Russian Orthodox churches count the most followers of those who do, while 6,000 people are Catholics.

Upon arriving in the capital Tallinn, Francis met Tuesday with President Kersti Kaljulaid. Later, he presides over a youth gathering before celebrating Mass in Tallinn's Freedom Square for the tiny Catholic community.

In a speech to Kaljulaid in the Rose Garden of the presidential palace, Francis praised Estonia's social and economic transformation in the quarter century since the Soviet Union's five-decade occupation ended.

But he warned that a certain "existential ennui" can set in when societies lose their cultural roots and put their faith in technological progress alone.

"One of the evident effects of technocratic societies is a loss of meaning in life and the joy of living," he said. Interpersonal and intergenerational bonds can be lost, depriving young generations of foundations to build a common future, he said.

"Consequently, one of the most important obligations incumbent on all of us who have social, political, educational and religious responsibilities has to do precisely with how we can keep building bonds," he said, adding that while small, the Catholic Church can make its contribution.

In her welcoming speech, Kaljulaid acknowledged that rapid changes taking place amid robust economic growth — something particularly visible in the Baltic nations — shouldn't mean the "vulnerable among us" are neglected.

"We must remember that economic success obliges us to take notice of others and reach out to them," Estonia's head of state said, referring to "the poor, the disabled, the very young and the very old."

As a token of Estonia's far-reaching technology society, Francis was presented by Kaljulaid a special digital ID card giving foreigners access to dozens of digital services in the Baltic country ranging from medical services to signing legal contracts and filing taxes.

The government says over 37,000 people from dozens of countries have currently been registered as "e-residents" in Estonia.

Estonia is the last stop in Francis' four-day visit that also took him to Lithuania and Latvia. He has aimed to encourage the Christian faith in the Baltics, which saw five decades of Soviet-imposed religious repression and state-sponsored atheism, as well as the World War II-era occupation by Nazi Germany.