An Ellicott City man who fatally shot a friend while “playing around” with a gun inside a parked car was sentenced to 40 years in prison, the Howard County State’s Attorney’s Office announced Friday.

Rane Dellinger, 21, pleaded guilty in December to second-degree murder and use of a firearm in a crime of violence.

Howard County Circuit Court Judge Richard S. Bernhardt suspended all but 10 years of Dellinger’s sentence, which will be served in a Department of Corrections facility.

Dellinger also was sentenced to five additional years to be served consecutively for violating his probation from an earlier conviction.

Just before 10 p.m. June 1, Dellinger was in a parked car with two other people in the parking lot of the Bethel Baptist Church in Ellicott City.

Dellinger and the two others began to smoke marijuana and played around with a revolver brought by Dellinger, according to charging documents.

Dellinger then fired a single shot that struck Jacob Mauer in the head, according to prosecutors.

Mauer, 20, of Ellicott City, was pronounced dead at the scene.

Dellinger fled and was arrested in North Carolina on June 3, prosecutors said. In July, prosecutors dropped Dellinger’s first-degree murder charge.