A Prince George’s County police officer working an off-duty security job at a Langley Park nightclub was shot in the leg early Saturday by a young man who had just been thrown out of the popular late-night hangout, authorities said.

The young man and two women were involved in a dispute in the Galaxy club in the 2000 block of University Boulevard, “possibly over a cellphone,” about 12:30 a.m., said Julie Parker, a county police spokeswoman.

Told to leave, all three got into a white Honda and started riding slowly through the club’s parking lot, Parker said.

Police said the man, who was driving, opened fire through the passenger door window. One shot struck Officer Rachel Jacob, a four-year veteran of the department, in the leg, police said.

Other officers on the scene returned fire, Parker said, then chased the Honda about a mile down University Boulevard. Eventually, she said, they took both women and the man — identified as Kelly Gilliss of the 11000 block of Cherry Hill Road in Beltsville — into custody and recovered the weapon believed to have been used in the shooting.

Parker said Gilliss appeared to have been targeting the officer or those who threw him out of the club.

“I don’t know why else they would be shooting, as they left the club, in that direction,” Parker said.

Jacob was hospitalized and required surgery, but she was expected to survive her injuries, Parker said. None of the suspects was hit by the return gunfire, although the Honda was, Parker said.

Gilliss, 32, was charged with attempted first-degree murder, first-degree assault and other offenses, police said.

The women were not identified.

The incident marks the fifth time in just more than 18 months that a county police officer has been shot or shot at, Parker said. She said the figure was a “unprecedented statistic for our department.”