ROME — St. Joseph teaches people to learn to take life as it comes and to accept what God has in mind, Pope Francis said.

Speaking about how Joseph reacted to Mary being pregnant while they were still engaged, the pope explained why St. Joseph “gives us an important lesson: He chooses Mary with ‘his eyes open,'” and “with all the risks” that came with it.

“They had probably cultivated dreams and expectations regarding their life and their future,” he said during his weekly general audience Dec. 1. But then, “out of the blue, God seems to have inserted himself into their lives and, even if at first it was difficult for them, both of them opened their hearts wide to the reality that was placed before them.”

During his audience in the Vatican’s Paul VI hall, Pope Francis continued a series of talks on St. Joseph, reflecting on his role as a just man and husband of Mary, and what he can teach all engaged couples and newlyweds.

St. Joseph was pious and subject to observing the religious laws of the time, which called for stoning a woman accused of adultery or — with later interpretations — a formal repudiation that had civil and criminal consequences for the woman, the pope said. But Joseph’s “love for Mary and his trust in her suggested a way he could remain in observance of the law and save the honor of his bride. He decided to repudiate her in secret, without making noise, without subjecting her to public humiliation.”

“How holy Joseph was,” Pope Francis said. In contrast, “we, as soon as we have a bit of gossip, something scandalous about someone else, we go around talking about it right away!”

An angel of the Lord appeared to Joseph in a dream, telling him not to fear taking Mary as his wife and explaining the divine origin of and plan for her son.

God reveals “a greater meaning than his own justice. How important it is for each one of us to cultivate a just life and, at the same time, to always feel the need for God’s help to broaden our horizons and to consider the circumstances of life from an always different, larger perspective,” the pope said.

Many times, he said, people feel “imprisoned” by what happens to them and are tempted to “close in on that pain, in that thought that good things never happen to us. And this is not good for us. This leads you to sadness and bitterness. A bitter heart is so ugly.”

Often, “a providence is hidden that takes shape over time and illuminates the meaning even of the pain that has touched us,” he said.

By taking this risk, Joseph “gives us this lesson: to take life as it comes. Has God intervened there? I accept it” and seek to follow God’s guidance, the pope said.

During their engagement, Christian couples are called to witness to this kind of love that “has the courage to move from the logic of falling in love to that of mature love,” the pope said. Mature love moves from infatuation and imagination to taking “responsibility for one’s life as it comes.”

It is demanding, but it will strengthen their love “so that it endures when faced with the trials of time,” he added.

“Dear brothers and dear sisters, our lives are very often not what we imagine them to be. Especially in loving and affectionate relationships,” Pope Francis said.

He repeated his advice to married couples, urging them to always make peace before the end of the day and never let arguments or bad feelings fester “because the cold war the next day is very dangerous. Don’t let war begin the next day.”

At the end of the audience, the pope recalled that Dec. 1 is World AIDS Day.

“It is an important occasion to remember the many people who are affected by this virus. For many of them, in some areas of the world, access to the necessary treatment is not available. My hope is that there might be a renewed commitment in solidarity to guarantee fair and effective health care,” he said.

He also asked for prayers for his trip Dec. 2-6 to Cyprus and Greece to visit the people whose countries are “rich in history, spirituality and civilization.”

“It will be a journey to the sources of apostolic faith and of fraternity among Christians of various confessions. I will also have the opportunity to draw near to a humanity wounded in the persons of so many migrants in search of hope: I will visit Lesbos. I ask all of you, please, to accompany me with your prayer,” he said.