Michael Skakel testifies during his appeal trial at Rockville Superior Court in Vernon, Conn., on Thursday, April 25, 2013. / AP Photo/The Stamford Advocate, Jason Rearick, Pool
Martha Moxley / AP
NEW HAVEN, Connecticut (CBS/AP) -- A Connecticut judge has granted a new trial for Kennedy cousin Michael Skakel, ruling his attorney failed to adequately represent him when he was convicted in 2002 of killing his neighbor, 15-year-old Martha Moxley, in Greenwich in 1975.
WATCH: 48 Hours: "The Ghosts of Greenwich"
The ruling by Judge Thomas Bishop marked a dramatic reversal after years of unsuccessful appeals by Skakel, the 52-year-old nephew of Robert F. Kennedy's widow, Ethel Kennedy. Skakel is serving 20 years to life.
" ...defense counsel was in a myriad of ways ineffective," Bishop wrote in the 136-page decision obtained by The Hartford Courant.
"As a consequence of trial counsel's failures as stated, the state procured a judgment of conviction that lacks reliability," Bishop reportedly wrote.
"The habeas petition is granted. The judgment of conviction is set aside and the matter referred back to the Stamford-Norwalk Judicial District for retrial," the ruling states, according to the paper.
The decision came following a habeas corpus hearing in Superior Court earlier in the year.
Bridgeport State's Attorney John Smriga said prosecutors will appeal.
Skakel argued trial attorney Michael Sherman was negligent in defending him when he was convicted in the golf club bludgeoning of Martha Moxley when they were both 15. Skakel's current attorney called the case weak.
Prosecutors contended Sherman's efforts far exceeded standards and that the verdict was based on compelling evidence against Skakel.