The Vatican has threatened to expel 24 American nuns from their religious orders unless they retract a statement published during the political campaign asserting that Roman Catholics can hold "a diversity of opinions" regarding abortion.

Two priests and two religious brothers also are subject to discipline.

The Vatican directive is in response to a full-page advertisement that appeared in The New York Times on Oct. 7. The ad bore the signatures of 97 Catholics -- lay as well as clergy, and most from academia. It called for "candid and respectful discussion" of the abortion issue, challenging the church's teaching that abortion is always morally wrong.

The ad, sponsored by the unofficial Catholics for a Free Choice, was published at the height of New York Archbishop John J. O'Connor's running battle with New York Gov. Mario M. Cuomo and Democratic vice-presidential nominee Geraldine A. Ferraro, both Catholics, over abortion.

The Vatican press office acknowledged yesterday that the Sacred Congregation for Religious and Secular Institutes had written to the religious superiors of the nuns, brothers and one priest. A second priest, who is not a member of a religious order, is expected to be disciplined by his bishop, a church spokesman said.

According to the Vatican press office, the letter, sent Nov. 30, asked the religious superiors to "demand . . . a public retraction" from each member who signed the ad. If a retraction is not forthcoming, superiors are to take action prescribed by church law, including "the threat of expulsion on grounds of obstinate insubordination," the press office said.

Church leaders were guarded yesterday in commenting on the situation, which some likened to the crisis of authority in the church 16 years ago over the Vatican's efforts to ban artificial birth control.

The women religious superiors who received the letter met here Monday and released a statement saying that they "are studying the matter with the care such a sensitive question deserves."

The National Conference of Catholic Bishops, which was not consulted in advance of the Vatican's action, expressed "hopes for a happy resolution of this dispute along the lines indicated by the Congregation for Religious and Secular Institutes."

At their annual meeting here last month, the bishops delegated the head of their doctrine committee, Archbishop John R. Quinn of San Francisco, to criticize the ad.

Quinn said the ad "contradicts the clear and constant teaching of the church that abortion is objectively immoral; it is not a legitimate moral choice."

Msgr. Daniel Hoye, general secretary of the National Conference of Catholic Bishops, agreed with Quinn's statement yesterday. "The teaching of the church on the abortion question is not a debatable issue," Hoye said.

According to a statement yesterday by the bishops' conference, the Vatican acted on the basis of canon (church) law, which allows dismissal from religious orders for "pertinacious upholding or spreading of doctrines condemned by the magisterium," the teaching authority of the pope and the bishops.

The October ad said that 75 other priests and nuns had indicated agreement with the published statement "but cannot sign because they fear losing their jobs."

One who did sign, Sister Ann Carr, who teaches theology at the University of Chicago, resigned her advisory post with the bishops' committee, which is drafting a pastoral letter on the role of women in church and society. She said she took the voluntary action because she believed that her association with the pro-choice-on-abortion ad would be seen by some bishops as "an impediment" to her work on the committee.

Expulsion from their orders would not mean that the nuns or other religious would be dismissed from the church. But it could mean loss of employment within an institution run by the order and the suspension of fringe benefits such as pension and other retirement income.

The Vatican's action was its first public admonition involving U.S. nuns on the abortion issue since it forced the resignation of Sister Agnes Mansour from her order last year. The Vatican pressured her to resign her job as head of Michigan's welfare department or leave her order because the department funds abortions for poor women.