In an interview published on Wednesday, the pope had said being homosexual was "not a crime ... but it's a sin".
People who criminalise homosexuality are "wrong",
Pope Francis said in a letter published on Saturday, seeking to clarify earlier comments about homosexual acts being a "sin".
In an interview published on Wednesday, the pope had said being homosexual was "not a crime ... but it's a sin".
In the letter published on Saturday, which was written to a Jesuit priest, Francis said he had wanted in the interview "to clarify that it (homosexuality) is not a crime, in order to stress that criminalisation is neither good nor just".
"When I said it is a sin, I was simply referring to Catholic moral teaching, which says that every sexual act outside of marriage is a sin," he wrote.
The pontiff was responding to a letter from US priest James Martin, who asked for clarity on comments the pope made during the interview with the Associated Press news agency.
The issue of homosexuality has caused a major rift in the Catholic Church between modernisers and conservatives.
Francis, 86, has stirred controversy since being appointed pope in 2013 with his relatively liberal attitude towards sexual orientation.
Francis' letter, written in Spanish, was translated into English and published by the website Outreach, a Catholic LGBTQ resource of which Martin is the editor.
"I would tell whoever wants to criminalise homosexuality that they are wrong," the pope wrote.
In the AP interview, Francis had said being homosexual was "not a crime".
"It's not a crime ... but it's a sin," he said, adding: "It's also a sin to lack charity with one another."
In his letter to Martin, Francis said his comments about "sin" were referring to overall moral teaching within the Catholic Church.
"When I said it is a sin, I was simply referring to Catholic moral teaching, which says that every sexual act outside of marriage is a sin," he wrote.
"Of course, one must also consider the circumstances, which may decrease or eliminate fault."
"As you can see, I was repeating something in general. I should have said 'It is a sin, as is any sexual act outside of marriage.'"
The pope's comments on homosexuality came ahead of a trip next week to Africa, where the criminalisation of homosexuality is common.
Francis plans to visit the Democratic Republic of Congo and South Sudan during his six-day visit to the continent.
Although Francis has often received gay people and instructed that they must be given a benevolent reception within the Church, he remains firmly in line with Catholic teaching on marriage.
That defines the union between a man and a woman in order to procreate.
In an earlier letter to Martin in June 2021, Francis thanked the priest for his work in reaching out to LGBTQ people, stressing the inclusive nature of Catholicism and writing that God "loves each of his children".
Months earlier, the Vatican had reaffirmed that it considered homosexuality "a sin" and said gays were unable to receive the sacrament of marriage.