The most controversial Supreme Court ruling this year, the 5-to-4 decision upholding a Georgia law criminalizing certain homosexual acts, was initially decided the other way until Justice Lewis F. Powell Jr. changed his mind, according to informed sources.

The case, Bowers v. Hardwick -- which gay rights groups call their Dred Scott decision -- was argued on Monday, March 31, and the justices met in secret conference several days later to discuss it.

Four justices, led by Harry A. Blackmun, voted to say that a constitutional right to privacy protects homosexuals and that the state would have to show important reasons to outlaw sodomy among consenting adults.

Though Powell did not agree with the reasoning, he voiced sufficient distaste for the antisodomy law that he agreed to provide the crucial fifth vote for an overall decision striking the Georgia statute.

Four other justices, led by Byron R. White, said the Constitution does not grant homosexuals a right to such conduct, even in their homes.

Powell's vote was tentative. All votes in conference are preliminary and can be changed at any time up to the formal announcement of the decision by the court.

With a fifth vote, Blackmun could have written a majority opinion that would have had the effect of overturning antisodomy laws in 24 states and the District of Colum- bia.

Within several days of the conference, however, Powell sent a brief memo to his fellow justices saying that he was switching his vote and would, given the "posture" of this case, join White and the others to uphold the Georgia law.

Sources were unable to pinpoint why Powell changed his mind. They said a critical factor was that Michael Hardwick, a gay Atlanta bartender, had not been prosecuted. Instead, Hardwick, through a civil lawsuit, was asking the court to declare the law unconstitutional.

Powell stayed with White, despite a strident dissent circulated by a furious Blackmun, and joined the majority opinion issued June 30.

Details of Powell's switch, provided by informed sources, offer an unusual glimpse of the workings of the Supreme Court. Though other accounts of justices' changing their minds in key cases have been disclosed in the past, such information rarely reaches the public.

When the court announced its ruling in the Georgia case, Powell issued a one-paragraph concurring opinion explaining why he was joining White. He strongly hinted that he would not vote to uphold such laws in future cases if lawyers argued that excessive prison terms for homosexual acts violated the constitutional prohibition against cruel and unusual punishment.

Powell felt that a homosexual might be able to argue that his or her sexual orientation was part of his or her natural being, comparing it to the way drug addicts can argue that their addiction is beyond their control. Thus, in Powell's view, if the state imposed criminal sanctions, especially the 20-year jail sentence Georgia set for a single act of sodomy, that would violate the cruel and unusual punishment ban in the Eighth Amendment.

Powell, sources said, dislikes antisodomy laws, feeling that they are useless, never enforced and unenforceable. In the case before the court, Atlanta prosecutors did not press charges against Hardwick, who had been arrested after being caught in his bedroom in a sex act with another man.

The sources said Powell would vote to repeal antisodomy laws if he were a legislator. There have been proscriptions against sodomy from the first days of recorded history. The court virtually would have to cast these aside under Blackmun's theory, Powell felt.

In addition, Powell has long had trouble with the notion that the court could substitute its views of morality for those of elected officials. He was reluctant to have the court recognize more special rights not spelled out in the Constitution, the sources said.

Powell's switch came before Blackmun had circulated his opinion to the other justices for review. White also had not circulated a dissent. Powell, sources said, simply changed his mind.

"In my view," Powell said in his concurring opinion announced on June 30, "a prison sentence for such conduct -- certainly a sentence of long duration . . . for a single private consensual act of sodomy . . . would create a serious Eighth Amendment issue."

But Hardwick "has not been tried," Powell said, "much less convicted and sentenced. Moreover, Hardwick has not raised the Eighth Amendment issue" in the lower courts.

Powell said he was joining White because "I cannot say that conduct condemned for hundreds of years has now become a fundamental right."

White's brief opinion said Hardwick was asking the court to say the Constitution protected private, consensual homosexual conduct.

"This we are quite unwilling to do," White said, noting the "ancient roots" of bans against sodomy and that all states had prohibited it until 1961. Chief Justice Warren E. Burger and Justices William H. Rehnquist and Sandra Day O'Connor also joined White.

Blackmun, joined by Justices William J. Brennan Jr., Thurgood Marshall and John Paul Stevens, accused the majority of an "obsessive focus on homosexual activity," given that the Georgia sodomy law covered heterosexual as well as homosexual acts.

"The court's cramped reading of the issue before it makes for a short opinion," Blackmun said, "but it does little to make for a persuasive one."

"It is revolting," he said, "to have no better reason for a rule of law than that so it was laid down at the time of Henry IV. It is still more revolting if the grounds upon which it was laid down have vanished long since, and the rule simply persists from blind imitation of the past."

The ruling provoked a firestorm of criticism. Civil rights groups said the court was treating homosexuals much as it treated blacks in the infamous Dred Scott ruling in 1857, when it declared blacks were not "citizens" entitled to constitutional protections.

The Bowers v. Hardwick ruling also could mark a critical departure from the court's 30-year willingness to discern new constitutional rights within the "penumbras" of the broad language of the Constitution and to declare certain matters -- such as contraception or abortion -- virtually off-limits to state regulation.

The case, however, may not be over. Hardwick, who spent 12 hours locked up after his arrest and who claimed harassment because of his homosexuality, may yet be given a chance to argue in the lower courts that his rights under the Eight Amendment were violated.