ROME — Warning of a society “without sexual differences,” the Vatican on Monday dismissed the idea that a person’s gender can differ from the assigned sex at birth and said a fluid idea of identity was not “based on the truths of existence.”

The right to “choose one’s gender,” the Vatican said in an official document, is in “direct contradiction of the model of marriage as being between one man and one woman.”

The document, released as a guide for Catholic educators, held firm to the religion’s traditional teaching on gender and sexuality. But ­LGBT members of the faith said it put an official and updated stamp on viewpoints they had hoped were changing.

“This casts everything back to the Dark Ages,” said Marianne Duddy-Burke, the executive director of ­DignityUSA, a group that advocates for ­LGBT equality and inclusion in the church. “I think it is incredibly insensitive, to be talking still about gender and sexuality as a choice and a momentary whim rather than a fundamental God-given identity.”

The document, released by the Vatican office that deals with education, coincided with a month of Pride festivities in many countries around the world. It was not signed by Francis, but rather by two high-level officials — Cardinal Giuseppe Versaldi and Archbishop Angelo Vincenzo Zani — in the Roman Curia, the Vatican’s bureaucracy.

The church’s retrenchment hints at one of the challenges it faces at a time of growing secularization — when many of its teachings on sexuality are being ignored as out of date. Francis has expressed an interest in outreach to ­LGBT followers, but he has also taken a clear stance on gender identity, decrying that children are taught in schools that “everyone can choose his or her sex.”

“And this is terrible,” Francis said in 2016.

The church on Monday said it was important to listen and “understand cultural events of recent decades,” but it also described a crisis in sexual education — a “disorientation” that was destabilizing the family and canceling out the differences between men and women.

The church made a case that children had the right to grow up in a family “with a father and a mother,” and the document quoted an earlier Francis speech about how children benefit from seeing masculinity represented by the father and femininity represented by the mother.

“It is precisely within the nucleus of the family unit that children can learn how to recognize the value and the beauty of the differences between the two sexes,” the document said.

Traditionalist groups lauded the 31-page Vatican document, titled “Male and Female He Created Them.” CitizenGO, a conservative Madrid-based group that campaigns around the world, called the latest church teaching an “extraordinary guidebook.”

“This authoritative tool is quite clear in the condemnation of gender ideology and of the grave damage it wreaks inside society,” the group said.

The Rev. James Martin, a prominent Jesuit who has advocated for the church to more openly welcome ­LGBT members, said on Twitter that the document calls for dialogue and listening “but sets aside the real-life experiences of ­LGBT people.”

“Sadly,” Martin wrote, “it will be used as a cudgel against transgender people, and an excuse to argue that they shouldn’t even exist.”