A judge has sentenced Charles Tan to 20 years behind bars on gun charges connected to the murder of his father in Pittsford in 2015.

Tan was arrested last year on the gun charges, nearly two years after murder charges against him were dismissed.

Prosecutors said Tan had a friend illegally purchase the gun used in the deadly shooting. Earlier this year, Tan pleaded guilty in the case.

Federal prosecutors urged the judge to give Tan the maximum sentence. However, in court documents, defense attorneys pleaded for a lighter sentence of just five years.

In other documents, Tan also tried to explain his actions leading to his father’s shooting. In a letter to the judge, Tan blamed escalating abuse by his father, saying he felt he had no other way to protect his mother.

However, Tan now admits he acted on “impulse” and made a “series of immature and irrational decisions.”

Speaking Monday afternoon, prosecutors said justice had been served. They also said Tan’s refusal to admit full guilt in the case, and explain exactly what happened the night his father was shot, was why he got the tough sentence. Despite admitting “wrongdoing” in the letter, U.S. Attorney Lisa Fletcher says, “I think the judge said that he still has not come out publicly and said I pulled the trigger he has gotten all the way up to that point it is clear and in his sentencing submissions but he has never said what happened in that hallway and in that room that night.”

In 2015, prosecutors said Tan, who was attending Cornell at the time, had a friend buy the shotgun used in the shooting at the Cortland Walmart after Tan was denied the sale.

After getting the gun, prosecutors said Tan drove back to his home on Coach Side Lane in Pittsford and killed his father. However, the death wasn’t reported until days later.

Tan faced murder charges in the case initially, but after a jury failed to reach a verdict during trial, the judge dropped the charges. For the next two years, despite appeals by prosecutors, the case seemed to be over with. Until the fall of 2017 when Tan was arrested again, this time on the federal gun charges.

Fletcher added, “The premeditation starts with the planning days in advance efforts… knowing that he was buying the murder weapon, he was buying a gun to go home and kill his father and the efforts that he made even up to the time he got home.”

Tan plead guilty to the gun charges in June. Prosecutors say, on good behavior, he may only serve up to 17 years behind bars.