The pontiff made the comments in a book-length interview with a German journalist, Light of the World: The Pope, the Church and the Signs of the Times, which is being released Tuesday. The Vatican newspaper ran excerpts on Saturday.
Church teaching has opposed condoms because they're a form of artificial contraception although it has never released an explicit policy about condoms and HIV. The Vatican has been harshly criticized in light of the AIDS crisis.
Benedict said that for male prostitutes — for whom contraception isn't the central issue — condoms are not a moral solution. But he said they could be justified "in the intention of reducing the risk of infection.''
He called it "a first step in a movement toward a different way, a more human way of living sexuality.''
Benedict drew the wrath of the United Nations, European governments and AIDS activisits when he told reporters en route to Africa in 2009 that the AIDS problem on the continent couldn't be resolved by distributing condoms.
"On the contrary, it increases the problem,'' he said then.
Journalist Peter Seewald, who interviewed Benedict over the course of six days this summer, revisited those comments and asked Benedict if it wasn't "madness'' for the Vatican to forbid a high-risk population to use condoms.
"There may be a basis in the case of some individuals, as perhaps when a male prostitute uses a condom, where this can be a first step in the direction of a moralization, a first assumption of responsibility,'' Benedict said.
But he stressed that it wasn't the way to deal with the evil of HIV, noting the church's position that abstinence and marital fidelity is the only sure way.
Christian Weisner, of the pro-reform group We Are Church in the pope's native Germany, said it was "surprising, and if that's the case one can be happy about the pope's ability to learn.
In other comments, Benedict said:
"If a pope is no longer physically, psychologically or spiritually capable of doing his job, then he has the "right, and under some circumstances, also an obligation to resign.''
On Islam, in Europe, he declined to endorse such moves as France's banning the burqa or Switzerland's citizen referendum to forbid topping mosques with minarets.
"Christians are tolerant, and in that respect they also allow others to have their self-image,'' Benedict replied when asked if Christians should be "glad'' about such initiatives. "As for the burqa, I can see no reason for a general ban.''
He was surprised by the scale of clerical sex abuse in his native Germany and acknowledged that the Vatican could have better communicated its response. "One can always wonder whether the pope should not speak more often.''
A man of deep personal faith, the former Cardinal Joseph Ratzinger has alienated some Roman Catholics with his zeal in enforcing church orthodoxy.
He grew up in the conservative Alpine foothills of Bavaria and 78, he has become the 265th pope of the Catholic Church and the first Germanic pope since the 11th century.
Many in Germany blamed Ratzinger for decrees from Rome barring Catholic priests from counseling pregnant teens on their options and blocking German Catholics from sharing communion with their Lutheran brethren at a joint gathering in 2003.
He also clashed with prominent liberal and moderate theologians.
In his autobiography, Ratzinger said he sensed he was out of step with his fellow Germans as early as the 1960s, when he was a young assistant at the Second Vatican Council in Rome.
Ratzinger wrote that he was enrolled in the Nazi youth movement against his will when he was 14 in 1941. He deserted the German army in April 1945, re-entered the seminary and was ordained, along with his brother, in 1951. He then spent several years teaching theology. In 1977, he was appointed bishop of Munich and elevated to cardinal three months later by Pope Paul VI.
John Paul II named him leader of the Congregation for the Doctrine of the Faith in 1981, where he was responsible for enforcing Catholic orthodoxy and was one of the key men in the drive to shore up the faith of the world's Roman Catholics.
Ratzinger who speaks Italian, English as well as his native language German, has been called a subtle thinker with a deep understanding of Catholic tradition and a personal touch he's not often given credit for.