Pope Francis speaks with journalists on board the flight from Baku to Rome, Sunday, Oct. 2, 2016. Photo: (Luca Zennaro/Pool Photo via AP)

Pope Francis speaks with journalists on board the flight from Baku to Rome, Sunday, Oct. 2, 2016. Photo: (Luca Zennaro/Pool Photo via AP)

ABOARD THE PAPAL PLANE (AP) — Pope Francis says Jesus would never turn away transgender faithful and that priests today should accompany them spiritually, even if they undergo sex change operations, sin and repent.

“These people must be accompanied as Jesus accompanied them,” he said.

Francis drew a firm distinction between the need for priests to minister to transgender Catholics and what he called the “nasty” tendency of schools to “indoctrinate” children with the idea that their gender is something that can be picked and chosen and changed.

“It’s one thing if a person has this tendency and also changes sex. It’s another thing to teach this in school to change mentalities. This is what I call ‘ideological colonization,'” Francis said.

As he has on previous foreign trips, Francis lashed out at the so-called “gender theory” during a visit this weekend to the former Soviet republic of Georgia. Francis has denounced for example how donors, including in his native Argentina, have conditioned their assistance to schools to using certain textbooks that espouse gender theory.

On Saturday in Tbilisi, Francis cited it as one of the threats that are causing a “world war against marriage” and an example of the “ideological colonization” that is corrupting many parts of the world.

Francis was asked Sunday en route home aboard the papal plane how, given his firm denunciation of gender theory, he would minister to Catholics who had struggled all their lives feeling that their bodies physically didn’t match their gender or sexual orientation.

Francis said he had ministered to such Catholics as a priest, bishop and now pope.

“I’ve never abandoned them,” he said. “When someone who has this condition comes before Jesus, Jesus would surely never say ‘go away because you’re gay.'”

Francis recounted the story of a Spanish transgender man who wrote him a letter recounting his transition from a woman to a man who later married a woman.

“And I received them. And they were happy,” Francis said of the audience.

Francis praised the bishop who accompanied the man throughout his transition. But he criticized the man’s parish priest, who he said would yell “You’ll go to hell” when he saw him on the sidewalk.

Francis recounted that the man found a retired parish priest who had a different attitude: “He said, ‘How long has it been since you’ve gone to confession? Come on. Let’s confess so you can receive Communion.'”

“Understood? Life is life,” Francis said. “Sin is sin.”

The pontiff acknowledged that the question of transgender Catholics poses a problem. “It’s a problem of morality. It’s a human problem. And it must be resolved as it can be. But always with the mercy of God, within the truth.”

While attention must be paid, he said, “in each case welcome, accompany, discern and integrate them” into the life of the church. “This is what Jesus would do today.”

He concluded by begging reporters flying with him on the papal plane: “Please don’t write ‘The pope blesses trans.’ Please.”

© 2016, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.