A judge sentenced a former security guard in Virginia to 30 years in prison Monday for killing a grandfather who had left his house at night to play Pokemon Go.

Cromwell had been found guilty of second-degree murder and the use of a firearm in the commission of a felony after he fatally shot Jiansheng Chen, 60, in January 2017 while the Chinese immigrant was playing the GPS-based mobile game.

Following his conviction in March, a jury recommended that Cromwell spend a total of three decades behind bars. The judge went along with that recommendation.

“We think it’s an excessive sentence because he’s not guilty,” Andrew Sacks, Cromwell’s defense attorney, said in a phone interview.

Sacks added that they will appeal.

Reached by email, Nancy Parr, the commonwealth's attorney, said justice had been served.

"While no sentence would ever take away the pain and loss of the Chen family, I hope that some closure occurred for them this morning," she wrote.

Cromwell had been charged with first-degree murder and claimed self-defense, arguing that Chen drove his van at him on the night of Jan. 26, 2017.

But prosecutors argued Cromwell purposely put himself in front of Chen’s vehicle, saying he was a security guard who wanted to use his power simply because he could, according to NBC affiliate WAVY.

Calling the shooting “a malicious killing,” prosecutors said Cromwell, while on patrol, confronted Chen about a mile from his home, where he had parked in the driveway of a clubhouse in the River Walk neighborhood of Chesapeake, Virginia.

Chen was out playing Pokemon Go as a way to bond with his nieces, nephews and grandchildren, a family attorney had said at the time. The attorney had added that Chen’s command of English was limited.

Sacks had said Chen was cited for trespassing 10 days earlier in the same area where the shooting took place, according to WAVY.Cromwell’s defense argued Chen was trying to elude security because he knew there would be up to a $2,500 fine and a year in jail, having already been cited.

Chen, who police said was unarmed, was shot four times in his upper left chest and once in his left upper arm, according to the commonwealth’s attorney. He died at the scene.

The Chen family has also filed a $5.35 million wrongful death lawsuit in the Virginia Beach Circuit Court against Cromwell, Citywide Protection Services and the River Walk Community Association.