(NEW YORK) -- An attorney for Kennedy cousin Michael Skakel said he expects to file a motion for bail later Thursday after a Connecticut judge granted a new trial for Skakel, who was convicted in 2002 of murdering a female neighbor when he was a teen. After years of unsuccessful appeals, Judge Thomas Bishop ruled Wednesday that Skakel's former attorney, Michael Sherman, didn't adequately represent him when he was convicted in the 1975 murder of Martha Moxley.
Skakel's current attorney, Hubert Santos, said he will file a motion on Thursday for bail and if granted, Skakel, 53, could then post bond and be released from prison.
"We're very, very thrilled," Santos said Wednesday. "I always felt that Michael was innocent."
Santos argued that Sherman failed to present crucial evidence and was too enamored with the media during the trial a decade ago.
Skakel, the nephew of Robert F. Kennedy's widow, Ethel Kennedy, is currently serving 20 years to life.
"[Sherman] was pre-occupied with the glitter and celebrity. He said to the bar association he was having fun on this case. A man's life was at stake," Robert F. Kennedy, Jr. told ABC News in defense of his cousin.
State's Attorney John Smriga says prosecutors will appeal the judge's decision.
"There is a distinct possibility that this week could be the last week that Michael Skakel does any jail time," defense attorney Mark Geragos, who is not affiliated with the case, told ABC News.
Moxley, 15, was found beaten to death on Oct. 30, 1975 in Greenwich, Conn., with a golf club, later traced to a set owned by Skakel's late mother. No arrests were made in the Moxley murder case for 24 years until another Connecticut judge, acting as a one-man grand jury, completed an 18-month investigation and concluded there was enough evidence to arrest Skakel. On Jan. 19, 2000, Skakel surrendered to police.
Skakel, who was 15 at the time of the murder, maintains his innocence. He was denied parole last year and was told he would not be eligible again to be considered for release for five years.
In his ruling, the judge wrote that defense in such a case requires attention to detail, an energetic investigation and a coherent plan of defense.
"Trial counsel's failures in each of these areas of representation were significant and, ultimately, fatal to a constitutionally adequate defense," Bishop wrote. "As a consequence of trial counsel's failures as stated, the state procured a judgment of conviction that lacks reliability."
Copyright 2013 ABC News Radio