LOS ANGELES, California — A Los Angeles judge has granted a new trial for a former Greenville man who earlier this year was convicted of manslaughter in connection with the shooting death of a homeless man last year in Hollywood, a spokesman for the Los Angeles County district attorney’s office said Wednesday.

Troy T. McVey, 24, was convicted in February of fatally shooting transient Richard Miller, 52, just before midnight on Jan. 4, 2015, at a busy intersection in the Hollywood district of Los Angeles.

“Mr. McVey’s defense attorney asked for a new trial on the manslaughter conviction, and the judge granted the motion this morning,” Greg Risling, Los Angeles County district attorney’s office spokesman, said Wednesday in an email. “The vandalism conviction from the first trial still stands.”

During McVey’s two previous trials, his lawyer, Arthur Lindars, argued that McVey had taken the drug Ecstasy and didn’t know what he was doing when he killed Miller.

Ecstasy, or MDMA, produces both amphetamine-like stimulation and mild mescaline-like hallucinations, according to the U.S. Drug Enforcement Agency.

Miller was shot multiple times and was taken to an area hospital, where he later died of his wounds, according to a news release from the Los Angeles Police Department issued the day after the shooting.

The incident was caught on surveillance cameras in the area and show McVey smashing a vehicle’s windows just before the shooting. The shooting also was witnessed by an off-duty Los Angeles Police Department officer, who helped lead police to McVey and Colby R. Kronholm, 23, of Greenville, who was visiting from Maine. Both were arrested and charged with murder, but the charge against Kronholm was later dropped, according to Risling. Deputy District Attorney Michael Dean handled the case.

McVey originally was tried for murder in October 2015, which resulted in a hung jury, but the former Mainer was deemed guilty of one count of felony vandalism during that first trial, Risling said.

His second murder trial started on Jan. 14, and both he and his mother testified on Feb. 5, just before final arguments were made. A jury deliberated for three days before McVey was convicted in February of one count of voluntary manslaughter while using a gun, the Los Angeles County district attorney’s office spokesman said.

Shortly after final arguments were made during McVey’s February trial, Lindars was informed by prosecutors that reports about the shooting victim’s mental health were not released as requested in May 2015. The Los Angeles attorney said at the time that he probably would file a motion for a mistrial.

“The next date is Oct. 12 for pretrial motions,” Risling said of McVey’s third trial.

If McVey is convicted of murder, he could face 25 years to life in prison, and if he is convicted of manslaughter, he could face a penalty of up to 21 years. The felony vandalism carries a penalty of up to eight months behind bars, Risling said.