The Episcopal Church yesterday formally barred from the priesthood practicing homosexuals as well as heterosexuals who engage in sex outside marriage.

In a conservative move for what is considered one of the more liberal Protestant denominations, lay and priest delegates to the church's General Convention in Denver endorsed a measure that for the first time makes it formal church policy to inquire into sexual practices of priesthood candidates. The House of Bishops had approved the measure on Monday.

In the past, it has been up to each bishop and his advisers to determine the fitness of candidates for the priesthood. While some bishops have made a point of excluding practicing homosexuals, it is widely acknowledged that there are substantial numbers of gay priests in the church and that some bishops knowingly ordained them.

The ban against homosexuality as well as heterosexual activity outside marriage, is based on the Bible, which is the primary source of the church's doctrine. Some contemporary scholars, however, have disagreed with traditional understandings of the biblical passages concerning homosexuality.

Yesterday's vote on the highly charged homosexuality issue sets the scene for further dissent for the 2.9-million-member denomination, which is still divided over its decision three year ago to ordain women. At least 23 bishops, many of them from the larger dioceses of the church, have given public notice that they cannot in conscience abide by the new restriction.

It is unclear how it will affect gay priests who are already ordained. Homosexuals willing to remain celibate presumably would be acceptable.

The House of Bishops adopted the resolution Monday during a stormy session in which one spectator, who shouted that the bishops should be "condemned to the fires of hell," was removed from the room.

The lay-clergy House of Deputies began its debate yesterday on a watered-down version of the bishops' resolution. In the course of debate, however, it was amended to conform with the bishops' version.

Most of the debate was focused on the homosexuality issue. It is unclear how the strictures against extramarital relations among heterosexuals will apply.

Following the vote Monday, 23 bishops, led by Bishop John Krumm of southern Ohio, signed a dissenters' statement declaring they would not accept or abide by the decision.

In their statement they maintained that "to accept or implement these recommendations would be to abrogate our responsibilities of apostolic leadership and prohetic witness to the flock of Christ committed to our charge and would involve a repudiation of our ordination vows as bishops."

The dissenters said the resolution of the majority "invites the prospect of retroactive reprisals against ordained homosexual persons with consequences of untold harm to the church and its people, whether homosexual or heterosexual."

Their conscience clause parallels a similar provision offered two years ago by Presiding Bishop John M. Allin. A year after the church's preceding General Convention had authorized the ordination of uomen, Allin approved a "conscience clause" exempting those bishops conscientiously opposed to ordaining women or assigning those already ordained to parishes within their dioceses.

In the Epscopal Church, priests are ordained by the bishop of a diocese. Their fitness for ordination is determined by diocesan committees who look into their motivation, their physical and emotional health and their academic preparation.

Some delegates argued that the anti-homosexual resolution would complicate this process.

"I think we have enough to do without asking prying questions into the sex lives of people uho want to be ordained into our clergy," said Bishop Ned Cole of Syracuse.

But Bishop Robert E. Terwilliger of Dallas, one of the strongest supporters of the resolution, said: "To fail to pass if might conceivably be fighting against God."