Pope Benedict XVI said in comments released Saturday that the use of condoms may be morally acceptable in some cases to prevent the spread of AIDS, possibly foreshadowing a shift in the Roman Catholic Church's stance on the issue.

The pope's remarks outline an exception to the church's long-held policy against the use of artificial contraception, including condoms.

The pontiff, speaking to the author of a book that will be published next week, cited the example of a prostitute.

"There could be single cases that can be justified, for instance when a prostitute uses a condom, and this can be a first step towards a moralization, a first assumption of responsibility, to develop again the awareness of the fact that not all is allowed and that one cannot do everything one wants," Benedict said.

The Vatican newspaper on Saturday released excerpts from the book, "Light of the World: The Pope, the Church, and the Signs of the Times," written by German journalist Peter Seewald and pubilshed by Ignatius Press.

"What makes this newsworthy is that he's talking about an exception, where there were no exceptions whatsoever before," said James Martin, a New York Jesuit priest and author.

"Just that the discussion is happening is significant," he added.

CNN Senior Vatican Analyst John Allen cautioned that Benedict's comments do not rise to the level of official Vatican policy, but show the pontiff has flexibility in the church's opposition to birth control.

Allen said that a portion of the book refers to condom use among male prostitutes.

"I think the point he was trying to make, when somebody is using a condom, not so much to prevent new life, which has always been the Catholic Church's big concern, but to prevent the transmission of disease than it would be OK," Allen told CNN.

Although Benedict did not mention it, his statements indicate he may also find condoms appropriate in the case of heterosexual couples where one of the partners has a sexually transmitted disease, Allen added.

Catholic theologians and a special Vatican commission have previously said that condoms may be acceptable in some cases to prevent AIDS, Allen wrote in a blog Saturday.

But Benedict had kept silent on the issue.

Allen said he does not think the pontiff's comments signal a sea change in the church's broader birth control policy, as condoning the use of a condom to prevent the spread of disease is not the same as saying it's okay to use one to prevent a pregnancy.

Still, Benedict's comments open a door and appear to mark a shift in his thinking about condoms and AIDS.

Speaking about AIDS in 2009, he told journalists during a trip to Africa that "You can't resolve it with the distribution of condoms," the pope told reporters. "On the contrary, it increases the problem."