A bill that would give terminally ill people the right to order that their lives not be prolonged was approved by a Virginia House of Delegates committee today after two longtime opponents--the Richmond Catholic diocese and the state medical society--agreed to support the controversial measure.

Today's 12-to-8 vote by the Health, Welfare and Institutions Committee marked a bittersweet and possibly short-lived victory for a "natural death" bill that has been defeated in committee three times since 1977. Despite support for the measure by the Catholic Church, the bill is opposed by antiabortion groups that vowed to lobby for its defeat in the full House, whose members are facing reelection.

"This bill opens up a Pandora's Box of mercy-killing and infanticide," said Geline B. Williams, chairman of the National Right to Life Committee, which claims 1,500 members in Virginia. "We are going to fight it."

The bill also angered women's groups and Planned Parenthood, whose leaders mounted an unsuccessful last-minute campaign to persuade committee members to include terminally ill or gravely injured pregnant women. That amendment was defeated after the lawyer for Catholic Bishop Walter Sullivan threatened to withdraw his support for the bill if pregnant women were included.

"We will not compromise on this, not with this committee, the Supreme Court or anyone else," said Nick Spinella, a lawyer for the Richmond diocese who helped draft the bill. He said the amendment would constitute approval of abortion.

Sponsored by Del. Bernard S. Cohen, an Alexandria Democrat and medical malpractice lawyer, the bill is similar to legislation recently adopted by 12 states and the District of Columbia. It would permit terminally ill adults in the presence of two non-relatives to leave a "living will" by instructing their doctors not to use life-prolonging machines such as respirators when death is imminent. The decision, made orally or in writing, could be revoked at any time.

"You can't be having a casual conversation with your spouse sometime and say 'Honey, I want you to unplug me if I'm ever comatose,' " said Cohen. The bill provides that a doctor and family members may decide by themselves against using means to artificially prolong life in cases of comatose people, such as car-accident victims diagnosed as being near death with no chance of recovery.

Cohen's bill, which exempts children, would grant immunity from civil or criminal prosecution to doctors, hospitals and health-care personnel who carry out a patient's wishes or those of his family. "This bill creates a safe harbor" for doctors who increasingly find themselves defendants in lawsuits, said Allen Goolsby, chief lobbyist for the Virginia Medical Society, who testified for the measure earlier this week.

In order to win the support of the Catholic diocese, the bill states specifically that it merely permits "the natural process of dying" and does not constitute euthanasia or suicide, which Catholic teaching expressly prohibits.

It was the provision excluding pregnant women, however, that threatened to torpedo the bill when one of its cosponsors, Del. Mary A. Marshall (D-Arlington), introduced an amendment that would have expanded it to include women less than seven months pregnant.

The amendment touched off a volatile debate when Spinella protested that it would "allow an unnatural death to take place."

Del. David G. Brickley, a Prince William Democrat who helped draft the bill, sided with Spinella and pleaded with his colleagues to "please keep the bill the way it is." Brickley said the bill could be amended later to include pregnant women.

But Del. Warren Stambaugh (D-Arlington), who has clashed with the Catholic Church over his support for abortion, disagreed. "I am of the Catholic faith and I do believe very strongly in death with dignity," Stambaugh said. "This is in essence a physician-protection act," he continued, calling the exclusion of pregnant women unjust. "This is not an abortion bill. It simply gives to pregnant women the rights given to every other competent adult. We ought to do what is right, not what is expedient, to get this bill passed."

After the amendment was defeated, Stambaugh announced he planned to vote against the bill, which he called "patently unconstitutional."

"I respect Del. Stambaugh's purity," Cohen said, as he urged his colleagues to support his bill. "Judges are begging for a natural death act so that they know what to do and aren't asked to make King Solomon-like decisions on a case-by-case basis," he said.

After the vote, leaders of Planned Parenthood and abortion-rights groups said they might lobby to have the pregnancy amendment restored on the House floor. "We were hoping the bill would pass because it has a lot of merit, but the pregnancy clause is clearly unconstitutional," said Bennet Greenberg, executive director of Virginia Planned Parenthood.