TRENTON — The plot is set in New Jersey, revolves around the Mafia and a federal trial and contains a long story arc, protracted over five years.

No, it doesn't involve Uncle Junior Soprano, but you might see it wrapped into a future project from "Sopranos" creator David Chase.

After years of tortured litigation and two overturned appeals over whether a New Jersey man helped Chase develop ideas for the hit mob drama 12 years ago, Chase said he planned to write about the case that was decided in his favor yesterday.

"That's the good thing about being a real writer," he said shortly after the jury announced its verdict. "Nothing gets thrown away. Everything that happens to you, you can use."

A jury of seven women and one man dismissed the claims of Robert Baer, ruling that the aspiring writer and former prosecutor was not owed anything for help he provided while Chase wrote an early draft of the "Sopranos" pilot episode, years before it was picked up by HBO.

Chase's lawyers hugged after hearing the verdict, which came after 90 minutes of deliberations on the fifth day of the trial.

Chase described Baer's lawsuit as a nuisance and said Baer blamed him for his own failure to be a writer.

"This has been like having a fly buzzing in your bathroom for seven years and now it has been swatted," Chase said.

"Unfortunately, America loves success," he said. "When it happens, some people seem to resent it. In show business, there are way too many cases like this. I tried to help him out with his writing, but it didn't work."

Baer claimed a "moral victory" because the jury determined that he had performed services for Chase. However, the jury awarded no money because it found that Baer had not proved he had a reasonable expectation of being compensated. It also found that Baer may have been hoping that Chase would help open doors in the entertainment business.

"I expected compensation, however it came, whether it was with money or whether it was with something else," Baer said.

Baer, who cross-examined Chase himself during the trial, said he still deserves credit.

"I helped him to create it," he said. "I was feeding him information, bringing him to people."

Baer claimed that he had provided help by arranging meetings with police and prosecutors during a three-day tour of New Jersey mob sites in 1995 and in subsequent conversations that sparked ideas for what became the hit HBO mob drama.

"Mr. Baer never quite understood how minimal his contributions were," said Chase's attorney, Peter Skolnik.

During the trial, Baer tried to claim credit for introducing the idea for the fictional Satriale's pork store where mob boss Tony Soprano and his crew hung out. But Chase said after the verdict that the idea had come from his childhood.

"My mother took me to a pork store in Newark, N.J., every Saturday," he said.

He said the idea for a pig on the roof came from a store in Queens he saw while driving from Kennedy Airport.

Baer also claimed that a large portion of the pilot was shot in Elizabeth, where he spent many hours with Chase on their tour.

"We shot in Elizabeth for two days," Chase said, holding the hand of his wife, Denise. They also shot in Hoboken, Paterson, North Caldwell, Verona, Manhattan and Clifton, he said.

Both men testified that Baer had turned down compensation from Chase three times. But Baer claimed that Chase had agreed to "take care of him" if the show was a hit. Baer said no monetary figure was ever discussed. Chase never offered him a writing job on the show. Chase said yesterday that he had compensated Baer by reading two scripts, and that he had been "ready to do more."

"It was sad because I tried to help him and he doesn't want to acknowledge that," Chase said.

Chase's attorneys contended that it was not the industry practice to pay advisers for help during the writing of a pilot.

Chase said that Baer was not himself an expert in the Mafia, but rather that Baer had introduced the Emmy-winning writer and producer to people who did have that knowledge.

When Chase rewrote "The Sopranos" pilot after it was rejected by Fox Broadcasting and other networks, he turned to "a true Mafia expert," Dan Castleman, his defense maintained.

Castleman, chief of the Manhattan district attorney's investigations division, testified that he had provided free consulting services to Chase, over several dozen phone calls, as Chase worked on the rewriting of the pilot. Castleman was later hired as a technical adviser and also appeared in several episodes as a federal prosecutor, an adversary to Tony's Uncle Junior. *