A 34-year-old Beltsville man was sentenced Friday to 40 years in prison for shooting an off-duty police officer in the leg outside of a nightclub in Prince George’s County, police said.

A jury convicted Kelly Gordon Gilliss in October of first-degree assault, criminal use of a handgun and reckless endangerment from a car related to a July 2012 incident outside of a club called Galaxy.

An off-duty officer who was working security at the club threw Gilliss and two women out of the club after they got into a dispute, police said. After they left, the trio got into a car, rode through the club’s parking lot and then fired at three officers.

Officers fired back and one was shot in the leg. She survived the shooting.

Get updates on your area delivered via e-mail