A judge in Maryland has granted a new trial to Adnan Syed, setting aside his conviction for the 1999 murder of his former girlfriend, in a case that was the subject of the first season of the hit podcast “Serial.”

Mr. Syed’s lawyer, C. Justin Brown, posted the news on Twitter on Thursday afternoon and confirmed by phone that the motion for a new trial had been granted by Judge Martin P. Welch of the Baltimore City Circuit Court.

The decision to grant Mr. Syed, 35, a retrial was a major victory for an inmate who has long maintained his innocence and has exhausted all other avenues of appeal. He was convicted in 2000 in the murder of his former girlfriend, Hae Min Lee, and had served 16 years of a life sentence.

“Serial” turned speculation about Mr. Syed’s guilt and whether he had received a fair trial into something of a national pastime in 2014. The show was downloaded more than 100 million times and won a Peabody Award for its role in illuminating flaws in the criminal justice system.