Pope Francis told young people in Thailand Friday that the secret to happiness is to be deeply rooted in faith in Jesus Christ.

"The secret to a happy heart is the security we find when we are anchored, rooted in Jesus: in his life, in his words, in his death and resurrection," Pope Francis said Nov. 22 in his homily at the Cathedral of the Assumption in Bangkok.

"Friendship cultivated with Jesus is the oil needed to light up your path in life and the path of all those around you," he said.

The pope celebrated Mass for an estimated 10,000 young people in and outside of Bangkok's Cathedral of the Assumption. The cathedral dates back more than 200 years to an initiative by  French missionaries.

"You are heirs to a precious history of evangelization that has been handed down to you as a sacred treasure. This beautiful cathedral is a witness to your ancestors' faith in Jesus Christ," the pope told Thai youth.

"In order that the fire of the Holy Spirit will keep burning, so that you can keep your eyes bright and your hearts aflame, you need to be deeply rooted in the faith of your ancestors: your parents, grandparents, and teachers," he said.

The Mass concluded Pope Francis' three-day apostolic journey to Thailand. The pope will depart Bangkok for Japan Nov. 23. There he will visit Tokyo, Nagasaki, and Hiroshima.

<blockquote class="twitter-tweet"><p lang="en" dir="ltr"><a href="https://twitter.com/hashtag/PopeFrancis?src=hash&amp;ref_src=twsrc%5Etfw">#PopeFrancis</a> has left the cathedral in Bangkok, <a href="https://twitter.com/hashtag/Thailand?src=hash&amp;ref_src=twsrc%5Etfw">#Thailand</a> to return to the nunciature to rest before we fly tomorrow to <a href="https://twitter.com/hashtag/Japan?src=hash&amp;ref_src=twsrc%5Etfw">#Japan</a>! <a href="https://t.co/Ks7OSzKR4l">pic.twitter.com/Ks7OSzKR4l</a></p>&mdash; Hannah Brockhaus (@HannahBrockhaus) <a href="https://twitter.com/HannahBrockhaus/status/1197842772599832577?ref_src=twsrc%5Etfw">November 22, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

"Dear young people, you are a new generation, with new hopes, dreams and questions, and surely some doubts as well, yet firmly rooted in Christ," Francis said.

More in Vatican

"It pains me to see young people sometimes being encouraged to build a future without roots, as if the world were just starting now. For it is impossible for us to grow unless we have strong roots to support us and to keep us firmly grounded," he said.

The pope explained that trees without deep roots can fall and die during a storm. He said that likewise young people without a firm sense of rootedness can be swayed by the "voices of the world that compete for our attention" that are appealing and exciting at first, but ultimately leaves one "empty, weary, alone, and disenchanted."

"Do you want to keep alive the fire that keeps you burning brightly amid darkness and difficulties? Do you want to be prepared to answer the Lord's call? Do you want to be ready to do his will?" the pope asked young people.

"Rooted in Christ, view all things with the joy and confidence born of knowing that the Lord has sought us out, found us and loved us infinitely," he said.

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I&#39;m at the Cathedral of the Assumption in Bangkok, <a href="https://twitter.com/hashtag/Thailand?src=hash&amp;ref_src=twsrc%5Etfw">#Thailand</a> where young Catholics are waiting for Mass with <a href="https://twitter.com/hashtag/PopeFrancis?src=hash&amp;ref_src=twsrc%5Etfw">#PopeFrancis</a> and the choir is practicing. <a href="https://t.co/gPhvKTpx5M">pic.twitter.com/gPhvKTpx5M</a></p>&mdash; Hannah Brockhaus (@HannahBrockhaus) <a href="https://twitter.com/HannahBrockhaus/status/1197803612446945286?ref_src=twsrc%5Etfw">November 22, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Pope Francis said not to be afraid of the future because it will bring "the most beautiful thing that it can bring us: the definitive coming of Christ into our lives and into our world."

"I urge you to maintain your joy and to look to the future with confidence," he said. "Just as God had a plan for the Chosen People, so he has a plan for each of you."

(Story continues below)