Kennedy cousin Michael Skakel has been granted a new trial after his 2002 conviction for the murder of Martha Moxley. REUTERS

Kennedy cousin Michael Skakel has been granted a new trial, 11 years after he was convicted and sentenced to 20 years to life for the 1975 murder of Greenwich, Conn., teenager Martha Moxley.

Judge Thomas Bishop’s 136-page decision focuses on Skakel’s original trial lawyer Michael Sherman, whom Bishop called “ineffective,” according to court documents obtained by the Hartford Courant.

"The defense of a serious felony prosecution requires attention to detail, an energetic investigation and a coherent plan of defense capable executed,” Bishop wrote. “Trial counsel's failures in each of these areas of representation were significant and, ultimately, fatal to a constitutionally adequate defense."

According to the New York Times, the ruling follows years of unsuccessful appeals by Skakel, who is the 52-year-old nephew of Ethel Kennedy, the widow of Robert F. Kennedy.

"As a consequence of trial counsel's failures as stated, the state procured a judgment of conviction that lacks reliability," Bishop wrote. "Although defense counsel's errors of judgment and execution are not the fault of the state, a defendant's constitutional right to adequate representation cannot be overshadowed by the inconvenience and financial and emotional cost of a new trial. To conclude otherwise would be to elevate expediency over the constitutional rights we cherish.

"The habeas petition is granted,” Bishop continued. “The judgment of conviction is set aside and the matter referred back to the Stamford-Norwalk Judicial District for retrial.”

Skakel’s lawyer Hubert Santos said he will file a motion for bail on Thursday. If the motion is approved, Skakel could post bond and be released from prison, the Times said.

Prosecutor Susann Gill maintains that Skakel was convicted because of the strength of the evidence against him, not because of the incompetence of his attorney. "If the evidence on which the jury based its verdict is not considered compelling, then many verdicts upheld in this state must truly be on shaky ground," Gill wrote in court papers, according to the Times.

Gill said the state had three confessions, multiple statements made by Skakel implicating him in the murder and evidence of a motive. "His drug-addled mental state, coupled with the infuriating knowledge that his hated brother Tommy had a sexual liaison with Martha, and the fact that Martha spurned his advances, triggered the rage which led him to beat her to death with a golf club," Gill wrote.

Santos -- who countered that the prosecution’s case was centered on “two witnesses of dubious credibility” who came forward with stories of confessions after 20 years -- said Sherman was "too enamored with the media attention to focus on the defense," according to the AP.

John Moxley, Martha Moxley’s brother, said Judge Bishop’s ruling caught his family by surprise, considering the fact that the evidence against Skakel appeared to be strong. "Having been in the courtroom during the trial, there were a lot of things that Mickey Sherman did very cleverly," Moxley said about Skakel's original lawyer. "But the evidence was against him. And when the evidence is against you, there's almost nothing you can do.

"I don't care if it was Perry Mason," Moxley said. "The state had the evidence. It was his own words and deeds that led to the conviction."