ABOARD THE PAPAL FLIGHT FROM AZERBAIJAN (CNS) — Catholics who are homosexual, confused about their sexuality or convinced they were born in the wrong body deserve the same attentive pastoral care as anyone else, Pope Francis said.

Flying back to Rome Oct. 2 after a visit to Georgia and Azerbaijan, the pope was asked, given his criticism Oct. 1 of “gender theory” and of what he describes as “ideological colonization,” how he would provide pastoral care to a person who felt his or her sexuality did not correspond to his or her biology.

Pope Francis began responding to the reporter’s question by saying that as a priest, a bishop and even as pope he has “accompanied people with homosexual tendencies and even homosexual activity. I accompanied them; I helped them draw closer to the Lord, although some couldn’t. But I never abandoned them.”

“People must be accompanied like Jesus would accompany them,” he said. “When a person who has this situation arrives before Jesus, Jesus certainly will not say, ‘Go away because you are homosexual.’ No.”

Pope Francis said what he was condemning was “indoctrination of gender theory,” teaching small children that no matter their biological sex, they can choose their gender. He said a Spanish father told him he had asked his son what he wanted to be when he grew up and the boy replied, “A girl.” The father realized the child was taught in school that gender is a choice “and this is against nature.”

“It is one thing for a person to have this tendency, this option and even to have a sex change, but it is another thing to teach this in schools in order to change mentalities. This I call ideological colonization,” the pope said.

The pope also told the story of a Spanish husband and wife whom he invited to the Vatican. The husband was born a girl, but always felt like a boy. When she was in her 20s, she told her mother she wanted a sex change operation, but the mother begged her not to do it as long as she was alive. When her mother died, she had the surgery, the pope said.

A Spanish bishop, “a good bishop,” spent time a lot of time “to accompany this man,” who later married, the pope said. They asked to come to the Vatican “and I received them and they were very happy.”

In the town where the man lived, he said, a new priest, “when he would see him would shout at him from the sidewalk, ‘You will go to hell!’ But when he’d meet his old priest, he would say to him, ‘How long has it been since you’ve confessed? Come on, confess so you can take Communion.'”

“Do you understand?” the pope asked the journalists. “Life is life and you must take things as they come. Sin is sin. And tendencies or hormonal imbalances” create problems “and you cannot say, ‘it’s all the same, let’s throw a party.’ No.”

Welcome the person, study the situation, accompany the person and integrate him or her into the life of the community, the pope said. “This is what Jesus would do today.”

“Please,” the pope told reporters, “Don’t say, ‘The pope will bless transgender people,’ OK?”

“I want to be clear. It is a moral problem. It is a problem. A human problem,” the pope said. “And it must be resolved the best one can — always with the mercy of God, with the truth” and “always with an open heart.”