The Supreme Court, striking down a Minnesota measure that it said discriminated against the Rev. Sun Myung Moon's Unification Church, delivered a strongly worded reminder yesterday that the "clearest command" of the Constitution requires official neutrality toward religious denominations including "small, new, or unpopular" ones.

Every religion must be treated the same and be "equally at liberty to exercise and propagate its beliefs," Justice William J. Brennan Jr. wrote for the majority in the 5-to-4 decision.

At issue in Larson vs. Valente was what civil liberties groups, religious advocates and yesterday the court itself called a case of "religious gerrymandering" in a Minnesota law designed to protect the public from charities frauds by imposing stringent reporting requirements on charitable solicitations.

The law exempted some religious organizations--those which receive more than half of their total contributions from members or affiliated organizations--placing the burden on groups that regularly solicit from the general public, like the Unification Church (whose followers are commonly called Moonies) and the Krishna Consciousness organization.

Those two groups, because of their proselytizing and fund-raising activities, have been the target of an increasing amount of regulatory legislation in states and municipalities and, like the Jehovah's Witnesses before them, the subject of an increasing amount of court litigation. Last term, the justices upheld Minnesota restrictions on solicitations at state fairs which had been challenged by the Krishna organization.

Unification Church members successfully sued Minnesota in U.S. District Court, contending that the exemptions gave preferred treatment to some religions. The Supreme Court agreed yesterday, affirming the 8th U.S. Circuit Court of Appeals.

Brennan said the Minnesota "50 per cent rule . . . clearly grants denominational preferences" by freeing some denominations from the filing requirement but not others.

Such different treatment might be permissible, he said, if the state could demonstrate a strong need for it. Minnesota had claimed that religious organizations raising money primarily from within have built-in controls to prevent fraud but those soliciting from the general public do not.

"We find no substantial support" for that argument, Brennan said. In fact, reviewing comments made when the provision was enacted in 1978, Brennan said the legislature may have purposely designed the provision to include the Unification Church and the Krishna group and to exempt, for example, Roman Catholics.

It "does not operate evenhandedly, nor was it intended to," Brennan wrote. It is "precisely the sort of official denominational preference that the framers of the First Amendment forbade," Brennan said, returning the controversy to the lower courts for trial.

The ruling places another mine in the already crowded legal minefield confronting local governments as they attempt to regulate charitable solicitations.

Justice John Paul Stevens joined Brennan's opinion but also filed a separate concurrence. Dissenting were Justices William H. Rehnquist, Byron R. White and Sandra Day O'Connor and Chief Justice Warren E. Burger.

Using unusually aggressive language, Rehnquist's dissent attacked the majority for even ruling on the Minnesota case. He said the lower courts had never decided whether the Unification Church was a "religious organization" that would be eligible for a religious exemption if it met the 50 per cent rule. If it is not eligible, he said, yesterday's ruling is merely an "advisory" opinion forbidden under court precedent.