Cardinal Joseph Ratzinger, Pope John Paul II's guardian of church orthodoxy, said today that the Vatican was completing a declaration on the controversial liberation theology aimed at clearing up debate on the issue.

"We are doing our most to get the declaration published," said the cardinal, the prefect of the Vatican's watchdog Congregation of Doctrine and Faith, in a rare press conference. "But final approval depends on the approval of the cardinals and the Holy Father, Pope John Paul II."

Cardinal Ratzinger, viewed by many the second most powerful man in the Vatican after the pope, generally has been considered an opponent of liberation theology and numerous other liberalizing changes and theological concepts that have flowed from the Second Vatican Council of 20 years ago.

The Latin American-based theology of liberation, which seeks to orient the Roman Catholic Church toward the poor and the oppressed, has emerged as one of the most radical and controversial fruits of the church's Second Vatican Council, whose review was the theme of a special synod of church bishops that ended Sunday.

Liberation theology did not figure prominently in the bishops' two weeks of discussions about the merits and problems of Vatican II. But the subject was raised in written statements by several bishops from Brazil, both pro and con, aware that a final definitive Vatican statement on liberation theology was in the works.

The Brazilian bishops are particularly interested in what position the Vatican takes on the issue because theirs is one of the countries in Latin America that has been most involved in it.

It was a mild-mannered Franciscan theologian in Brazil, the Rev. Leonardo Boff, who first drew Ratzinger's wrath against liberation theology with his 1981 book, "The Church: Charisma and Power." In his work, Boff openly attacked the "monarchic and pyramidic" church hierarchy, which, he claimed, instinctively was allied with the rich minority rather than the poor majority.

The works of Boff and other Latin American liberation theologists following Vatican II increasingly have drawn the fire of such Vatican guardians of dogma as Ratzinger, whose office in 1984 issued its first "instruction" warning on the false notions of some aspects of liberation theology, which it claimed derived from Marxist, not Christian, analysis.

Boff was summoned to Rome to explain his views before Ratzinger and eventually was silenced by Vatican orders. But that has not laid to rest the issue, which has brought the church into politics in El Salvador, Nicaragua, Brazil and Chile.

Ratzinger's document, church officials here feel, will establish the margins within which the Vatican Council's "preference for the poor," the theological foundation of the liberation theology, is allowed to operate.

Ratzinger's comments on the Vatican declaration on liberation theology came in a press conference he called to promote the publication of a book of 58 documents issued by his Congregation of Doctrine and Faith, the former Vatican Holy Office, in the 20 years since the council.

The book was being published, Ratzinger said, to help bishops and theologians guard against doctrinal "errors caused by human frailty."

The book contains his office's pronouncements against abortion, divorce, euthanasia, female priests and the questioning of papal authority by such eminent theologians as Hans Kueng as well as the admonition on the Marxist overtones of liberation theology. The presentation of Ratzinger's latest book so soon after the end of the bishops' synod was seen by observers here as a reminder of his office's role of defending orthodoxy, no matter how Vatican II was interpreted.

Although the synod's conclusions on Vatican II were compromises between traditionalists such as Ratzinger and progressives such as Bishop James Malone, the president of the U.S. National Catholic Conference of Bishops, Ratzinger's message today was viewed as a reminder that ultimately his office, and not the bishops, will determine what is permissible in the church.

"From the beginning, the treasures of the truth of faith, entrusted by Christ to the church, must not only be kept faithfully but also further explained and developed, and at times also defended against errors caused by human frailty," Ratzinger said today.