LOS ANGELES, DEC. 21 -- A State Superior Court judge here ruled today that the contract between Paramount Pictures and syndicated columnist Art Buchwald was unfair to Buchwald and indicated he will rewrite the contract provisions.

The decision was the end of the second major phase in Buchwald's long-running lawsuit against Paramount over the profits to Eddie Murphy's hit film "Coming to America." Earlier this year, the judge ruled that the film's story was based on an idea submitted by Buchwald and that Buchwald and his producer Alain Bernheim were entitled to their contractual share of the film's net profits, possibly totaling more than 40 percent.

Today's decision could mean millions to Buchwald and Bernheim -- the actual dollar amount is to be determined in the next phase of the trial.

In addition, the decision could radically alter the standard way of doing business in Hollywood.

"I can't tell you how happy I am," said Buchwald by phone from his home in Washington immediately after the decision was issued. "I think it's a great thing for Christmas -- a good Christmas for the little people."

Paramount said it was "shocked and astounded" by the decision, especially because Judge Harvey Schneider said in effect that he would rewrite the contract virtually from scratch to produce what he called "an equitable result." Paramount attorney Charles Diamond said that "never before in the annals of American jurisprudence has a judge taken it upon himself to remake the parties' bargain."

In a prepared statement faxed to the media shortly after the decision, Paramount's public relations arm called Schneider's decision "a threat to the free-market system" that went "far beyond existing law." The studio said it would appeal.

Pierce O'Donnell, the attorney for Buchwald and Bernheim, replied that "rather than destroying the free-market system of Hollywood, the judge's decision preserves the free-market system in Hollywood by making the playing field for negotiations more level. Judge Schneider has helped save Paramount and the other studios from their own greed." O'Donnell said he expected to collect "several million dollars" for his clients as a result of the decision.

Buchwald originally sued Paramount because he had signed a contract with the studio in 1983 to sell an idea about an African prince coming to America to find a wife. When the movie was made, however, he received no credit or money. After the court ruled that "Coming to America" was based on Buchwald's idea, Paramount argued that under the contract Buchwald signed, the movie, which grossed some $350 million, had made no net profit.

At that point Buchwald's attorneys argued that the contract was itself unfair, a take-it-or-leave-it "contract of adhesion" that overwhelmingly favored the studio. Today, Schneider emphatically agreed:

"It is clear," he wrote, "that if a talent such as Bernheim wishes to work in the film industry, he must do so on terms substantially dictated by the film industry."

He also wrote, "It is true Paramount has submitted evidence that it freely negotiates its net profits formula with the talent with which it deals. The court is not impressed with Paramount's evidence. To the contrary, the court concludes plaintiffs have proved by a preponderance of the evidence that Paramount negotiates its net profit formula with only a relatively small number of persons who possess the necessary 'clout,' and even these negotiations result in changes that are cosmetic, rather than substantive."

Schneider also itemized a series of provisions in the contract he found "unconscionable" -- a list that could have tremendous impact in Hollywood since most of the provisions are standard throughout the film industry. Late today, the Writers Guild of America West said it could not comment on the potential impact until it had studied the contract.

The list included a 10 percent advertising overhead, a 15 percent overall overhead, interest charged on the cost of making the film, interest charged on overhead, interest on profit participation payments, and the general interest rate Paramount applied, which is higher than the rate banks charge. He also objected to a 15 percent overhead on Eddie Murphy Productions' operational allowance.

His wording was substantially the same in each provision. The advertising overhead "bore no relation to actual costs." The overall overhead charges "do not even remotely correspond to the actual costs incurred by Paramount." The Eddie Murphy Productions overhead amounted to "overhead on overhead."

The judge was unable to fix a sum on Buchwald and Bernheim's victory, saying he didn't have sufficient facts and needed to defer to a third phase of the trial the amount of damages. But he didn't satisfy Paramount's request that the contracts of Buchwald and Bernheim be severed -- a critical ruling, since Bernheim holds a minimum of 17.5 percent (and as much as 40 percent) of the movie's net profits and Buchwald 1.5 percent.

He did throw one bone to Paramount, denying Buchwald and Bernheim's request that the contract be rewritten only to give Paramount a reasonable rate of return above its costs.

"The result would be an inequitable windfall to Bernheim ... {resulting} in Bernheim receiving a profit far beyond the contemplation of the parties at the time the contract was entered into and, apparently, far beyond the profit a producer with Bernheim's experience and track record would reasonably have been expected to earn."

Schneider said he would seek expert testimony to find an equitable middle ground.

Still, it was a bone that stuck in Paramount's throat. "Judge Schneider has told Paramount that it is going to have to pay more for {Buchwald's} idea than it ever agreed to pay, more than Buchwald asked for, and more than any studio would have agreed to pay," said Diamond. "We view that as simply an outrage."