(CNN) - The Connecticut Supreme Court has vacated Michael Skakel's conviction in a decades-old murder case and ordered a new trial.
The ruling is the latest in a long legal battle waged by Skakel, 57, the nephew of Robert and Ethel Kennedy, who was accused of brutally killing a teenaged girl in 1975.
He served about half of a 20-year sentence but was freed on bond in 2013, when the courts first ordered a new trial.
The court ruled that Skakel's attorney, Michael Sherman, "rendered ineffective assistance" by failing to identify an alibi witness for his client, and that as a result, Skakel was deprived of a fair trial.
Prosecutors can choose to retry Skakel, according to the decision, but the defense would now have the benefit of that alibi testimony. The prosecutor's office was not immediately available for comment.
Authorities said Skakel was 15 when he killed his neighbor Martha Moxley, also 15.
Her body was found in October 1975 after a night of partying with Skakel, his older brother Tommy and other teenagers in an affluent gated community in Greenwich, Connecticut. Authorities said she was bludgeoned and stabbed to death; a broken golf club was found near her body.
Skadel has always said he was innocent.
Though Skakel had been a suspect for years, he did not go to trial until 2002, when he was convicted and sentenced to 20 years to life in prison. One of Skakel's three previous appeals went to the US Supreme Court but in 2006 the justices declined to hear that petition.
In October 2012 he was denied parole, but a year later a state appellate judge determined that the case presented by his defense attorney Sherman was "constitutionally deficient" and ordered a new trial.
Skakel was released from prison on bond in November 2013.
In December 2016, the Connecticut Supreme Court reinstated the 2002 murder conviction, but Skakel's lawyers appealed.
On Friday, the state Supreme Court reversed its own decision.
Mark Dupuis, communications and legislative specialist at Connecticut's Division of Criminal Justice, told CNN: "We are reviewing the court's opinions and have no comment at this time."
Moxley's mother, Dorothy, told CNN on Friday that she didn't expect the decision.
"It is what it is and we just have to go from here," she said. "I'm willing to do whatever the state of Connecticut wants me to do."
"I was 43 when she was murdered and I'll be 86 next month," she said. "This has been going on for half my life."
Copyright 2018 by CNN NewSource. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.