The attorney who represented Kennedy cousin Michael Skakel at his 2002 murder trial testified Tuesday that the case was corrupted by a book deal involving the lead investigator and a former Newsday reporter.

"The primary investigator was looking at a pot of gold" if Skakel was convicted of murdering Martha Moxley in 1975 in Greenwich, Skakel attorney Michael Sherman said. "There was a motive here as opposed to just looking for justice for all parties."

Sherman, testifying Tuesday during Skakel's bid for a new trial, said he asked about the book deal before Skakel was convicted, but was dissuaded from seeking further information because the judge glared at him.

Skakel, 46, is serving 20 years to life in prison.

Click here to read the case materials on Skakel (pdf)

To win a new trial, his attorneys must prove that new evidence not available before his conviction could have changed the jury's verdict. The non-jury hearing is expected to conclude Wednesday or Thursday, but the judge does not plan to rule for weeks or months.

In addition to questions about the book deal, Skakel is pinning his hopes for a new trial on a former classmate's claim that two other men told him they got Moxley "caveman style." Skakel's attorneys are also challenging another former classmate's claim that Skakel confessed to him.

On Tuesday, Sherman testified that his trial strategy would have changed had he known about a book on the case by former Newsday reporter Len Levitt.

Defense attorneys are trying to prove that Levitt had a financial agreement with lead investigator Frank Garr.

Prosecutor Jonathan Benedict has said Garr's involvement in the book and the financial arrangements were made after Skakel's conviction.

"Any agreements I made with Mr. Levitt was done after the proceedings, after the trial," Garr said Tuesday.

Garr also testified that he did not give Sherman profile reports about Skakel and two other suspects in the case because Benedict had told him not to.

Prosecutors say the state Supreme Court rejected that issue during a separate appeal. They say the substance of the reports was disclosed in numerous police reports and other records turned over to Sherman.

Levitt testified last week that he planned to write the book regardless of how the trial ended and that Garr always told him that he couldn't help until Skakel's trial was over. He said the two men split the profits from the book, with Garr receiving less than $10,000.

But Sherman said he would have used information about the planned book to develop the theme that witnesses were being coerced or ignored.

"It shows all along there was not a perfect motive but a very substantial motive to win that case at any cost," he said.

Under cross-examination, prosecutors questioned why Sherman didn't pursue the matter after the judge glared at him. He said he had filed a motion before the trial for information about any financial interests investigators may have had, including plans to write books.

Also Tuesday, Cliff Grubin, who attended a reform school in Maine with Michael Skakel in the late 1970s, testified that he never heard Skakel confess to killing Moxley.

Another former classmate at Elan School, Gregory Coleman, said at a hearing before Skakel's trial that Skakel confessed to killing Moxley and said he would get away with murder because "I'm a Kennedy." Coleman admitted to being high on heroin during his grand jury appearance and he died in 2001 after using drugs, but his testimony was read into the record during Skakel's trial.

Grubin said Skakel did not confess, but did express concerns about his brother's possible involvement in Moxley's death. Thomas Skakel was an earlier suspect but was never charged.

"It was more concern about his brother's involvement," Grubin said. "There was no confession."

Prosecutors brought up what Michael Skakel's private investigator said Grubin told him in 2005.

"Skakel confessed to Grubin several times that his brother, Tommy Skakel, killed Martha Moxley," according to a transcript. "Grubin told me he will never say this again and will not testify to it. Grubin explained that he believes Skakel is protecting his brother and it is up to Michael Skakel to come forward and tell the truth."

Pressed by Benedict about his statement Tuesday, Grubin initially denied that Michael Skakel told him Thomas had killed Moxley. He also said he didn't remember telling the private eye he wouldn't testify.

"I don't remember exactly that," he said. "If he was concerned with his brother, I guess it was between them."