The Supreme Court ruled yesterday that states may not allow major parties to monopolize presidential elections by imposing burdensome and unequal candidacy requirements on independent contenders, such as John B. Anderson.

The 5-to-4 decision in Anderson v. Celebrezze, which strikes down Ohio's early general election filing deadline for independent candidates, is an important and potentially far-reaching statement of the rights of what the court majority called "independent-minded voters" to "diversity and competition" in presidential campaigns.

The deadline was challenged by Anderson, a 1980 independent presidential candidate who is attempting to form a third party for another run for the White House in 1984.

Anderson, a former Republican congressman from Illinois, said his campaign spent $1 million in legal fees and devoted months of effort simply to get on the ballots in enough states to make the campaign worthwhile. He called the ruling "a landmark decision."

It was the second major victory in recent months for Anderson. Earlier, the Federal Election Commission ruled that he would be eligible to receive about $6 million in public financing if he runs as a third-party candidate in 1984.

Yesterday's Supreme Court ruling would make it easier than ever before for an independent or third-party candidate to launch a presidential bid, said George Frampton, Anderson's attorney.

"As late as March or April, a candidate with substantial backing--a businessman, an advocate of the nuclear freeze or an environmentalist--could have a chance to compete," he said.

Anderson this week mailed to 40,000 supporters letters stating that "the time is ripe for the establishment of a new political party" because "neither old party is facing up to the real challenges of the '80s." He said in an interview that he will decide whether to go ahead with such an effort by the end of the year.

Others mentioned as possible third-party or independent candidates include civil rights leader Jesse Jackson and Sen. Jesse Helms (R-N.C.), although Helms has denied interest in any such effort.

The court's majority opinion, written by Justice John Paul Stevens, said requirements that "fall unequally" on independents, or on minor parties, violate the freedom of choice protected by the First Amendment.

The ruling will open to court challenge all the complex filing requirements that confront anyone who runs for president outside the major parties. While major-party candidates nominated in the summer conventions automatically are placed on general election ballots, independents face what has been called a "race against the calendar" in most states, even when they declare in the spring of an election year.

Anderson, for example, had missed filing deadlines in five states when he announced his independent quest on April 24, 1980. One was Ohio, which had a March 20 deadline for independents in 1980 and rejected Anderson's petitions when he tried to file on May 16.

Only a U.S. District Court order, reversed by the 6th U.S. Circuit Court of Appeals after the November election, allowed Anderson to run in Ohio, where he received 254,472 votes or 5.9 percent. He got 7 percent of the vote nationally.

Before the Supreme Court, Ohio defended its early deadline as a legitimate tool to give voters time to learn about candidates and to bring "political stability" to the state's electoral process.

Stevens dismissed both justifications, saying that minor candidates should be allowed to file after the two major parties have chosen their candidates and that "in the modern world it is somewhat unrealistic to suggest that it takes more than seven months to inform the electorate about the qualifications of a particular candidate simply because he lacks a partisan label."

The "stability" argument, he wrote, "amounts to a desire to protect existing political parties from competition--competition for campaign workers, voter support, and other campaign resources--generated by independent candidates who have previously been affiliated with the party."

The Ohio law, he said, discriminates against all "late-emerging presidential candidates outside the major parties," and thus " 'denies the disaffected not only a choice of leadership but a choice on the issues as well,' " he said, quoting from an earlier Supreme Court decision.

"It places a significant state-imposed restriction on a nationwide electoral process," Stevens wrote.

"Historically, political figures outside the two major parties have been fertile sources of new ideas and new programs," he said. "Many of their challenges to the status quo have in time made their way into the political mainstream."

Justice William H. Rehnquist, joined by Justices Byron R. White, Lewis F. Powell Jr. and Sandra D. O'Connor, dissented. They quoted Article II of the Constitution, which sets up the Electoral College, and said that provision leaves it to the states to decide how they will choose electors.

"The Constitution does not require that a state allow any particular presidential candidate to be on its ballot, and so long as the Ohio ballot access laws are rational and allow nonparty candidates reasonable access to the general election ballot, this court should not interfere . . . ," Rehnquist said.