The Supreme Court's ruling this week that the government can and should withhold tax breaks from religious schools that practice racial discrimination has left the churches, even those who have fought hardest against racism, uneasy and in some cases divided.

The ruling was "both good and bad," said William P. Thompson, chief executive officer of the United Presbyterian Church and himself a lawyer.

"It's good in that it affirmed the principle of a nonracist culture, that our church and most of the other churches have been working for. That principle has been held up and made paramount."

But the negative aspect of the decision, for Thompson and others, is what some see as a breach in the wall of separation of church and state.

The court ruling revolved around Bob Jones University's prohibition of interracial dating, a stricture that the fundamentalist school holds is rooted in the Bible. The Internal Revenue Service, ruling that such a practice constituted racial discrimination, denied tax exemption for the school.

By an 8-to-1 vote, the Supreme Court held that the IRS had acted correctly because the school's racial practice violated "a fundamental national public policy." The court ruled that the government's need to eliminate racial discrimination from society "substantially outweighs whatever burden" the policy places on the religious beliefs manifested by the school.

For many church leaders, who are appalled at the use of the Bible to support racial discrimination, the court's decision raises basic First Amendment questions.

"It left us with a terribly ambivalent feeling," said James Dunn of the Baptist Joint Committee on Public Affairs. "On the one hand is our commitment to full-fledged religious freedom; on the other hand is our commitment to racial justice," said Dunn.

A number of church groups filed amicus curie (friend of the court) briefs on both sides of the issue. Some, like the National Association of Evangelicals, the United Presbyterian Church, the American Baptist Churches and others, held that however much they disagreed with Bob Jones University's racial policies or interpretation of scripture, the First Amendment barred the government from intervening.

Others, such as the United Church of Christ, and the American Jewish Committee, held that the pivotal issue was racial discrimination. In a brief filed jointly with the American Civil Liberties Union, the American Jewish Committee argued that the First Amendment issue was "heavily outweighed . . . by the compelling, constitutionally mandated national interest in eliminating government-supported race discrimination in education."

The National Council of Churches, an agency strongly committed both to racial equality and defense of religious liberty, was so torn by what an official called an "internal impasse" that it did not file an amicus brief. Thus Tuesday's ruling was hailed by the NCC's racial justice commission as "a very positive day for racial minorities," and deplored by the religious liberty office as dangerous precedent in issues of separation between church and state.

The Rev. Dean Kelley, the NCC's religious liberty expert, said that decision forces religious institutions to choose between "practicing its religion and retaining its tax exemption."

Tax exemption, he explained, "has been a buffer to protect a wide range of citizen organizations that have an important part to play in shaping the definition of public policy, not just conforming to existing public policy defined by those in power."

The court decision, in Kelley's view, could open the door to future actions in which the government could conceivably lift a religious group's tax exemption for such activities as counseling draft resisters, sheltering refugees from El Salvador, or engaging in a secondary boycott of firms doing business with South Africa--all on the grounds that such activities violate public policy as defined by a particular administration.

But in another office of the National Council, the Rev. Tyrone Pitts, director of the NCC racial justice program, disagreed with Kelley and saw the court's unambiguous condemnation of racial discrimination as the preeminent issue. "It's an excellent decision that says segregation is wrong and not to be tolerated by the federal government."

A spokesman for the United Church of Christ agreed with Pitts' view. "The compelling interest is that the educational system be free of discrimination," said the Rev. Everett C. Parker. "Freedom of religious belief and practice is not the issue of this case."

The National Association of Evangelicals raised a whole new issue in its amicus brief, the issue of sex discrimination. Christians differ, the NAE document points out, on what the Bible says about the proper roles of women in the church. "Many evangelical churches do not believe in the ordination of women as pastors or elders," the brief declared. Neither does the Roman Catholic Church.

For many church leaders, the question remains: Beyond the triumph for racial justice that the court's decision secured, how many other issues has it opened up?