HARRISBURG, Pa. (AP) — A judge cleared the way Thursday for the potential release of an Indian citizen who was taken into Immigration and Customs Enforcement custody last year after his Pennsylvania murder conviction was overturned following four decades in prison. The decision came after a four-hour hearing in which Subramanyam Vedam insisted he did not fatally shoot Thomas Kinser in 1980 and was questioned by a Department of Homeland Security lawyer. Vedam participated in the hearing Wednesday remotely from the Moshannon Valley Processing Center in Philipsburg, Pennsylvania. “I was young and stupid and did a lot of dumb things back then,” Vedam said. The federal government wants to deport the 64-year-old to India, which he left as a baby in 1962. U.S. Immigration Judge Adam Panopoulos said Vedam proved he was genuinely rehabilitated and did not pose a danger to the public. He cited Vedam’s efforts to improve literacy among inmates and his close ties to his family, including nieces who have never known him as a free man. Vedam “has grown as a person” and “began to dedicate himself to enriching other people’s lives and ultimately his own through academic study and enrichment,” the judge said Thursday. The U.S. Department of Homeland Security has a month to appeal. Vedam’s lawyer indicated he plans to seek his client’s release on bond. His attorney, Ava Benach, said Vedam hopes to live with a relative in Sacramento, California, and has been offered a spot in Oregon State University’s doctoral program in applied anthropology. Late last year, the State College prosecutor declined to retry Vedam after a Centre County judge determined that relevant ballistics evidence had not been disclosed by prosecutors during Vedam’s two trials. Vedam told Panopoulos he turned down plea bargain offers during his first trial and that prosecutors made similar overtures during his retrial. Both ended in first-degree murder convictions. “I never stopped saying I was innocent of this charge,” Vedam told the judge. He has been behind bars since March 31, 1982. Vedam and Kinser had been high school friends and both were 19 years old when Kinser disappeared. He was last seen alive after taking Vedam to buy drugs in December 1980. Kinser’s van was found outside his apartment in State College and it was more than nine months later that hikers came across his remains in a sinkhole miles away. He had been shot in the head. The gun was never found. Vedam was arrested on drug charges and eventually accused and convicted of Kinser’s murder. Jurors were told Vedam purchased a stolen .25-caliber gun and ammunition around the time Kinser disappeared but were not informed that an FBI report suggested Kinser’s head wound was too small for bullets that size. In an Oct. 2 release announcing his decision not to retry Vedam, Centre County District Attorney Bernie Cantorna called it “a compelling circumstantial case” but that a third trial would be difficult because of the passage of time. Cantorna cited “the reality that 44 years is a sufficient sentence for a murder committed by someone who was nineteen years old.” Despite being cleared of Kinser’s murder, Vedam’s no-contest pleas to LSD distribution charges put him in danger of deportation. During the Wednesday hearing, DHS lawyer Tammy Dusharm pressed Vedam about his other arrests, including for driving under the influence and theft.