A Prince George’s County police officer shot at a robbery suspect Friday night in Brentwood after the suspect reached for the officer’s gun, authorities said.

Cpl. Henry Tippett, a Prince George’s County police spokesman, said the officer fired once but did not hit the suspect. He said the suspect stopped trying to reach for the gun after a shot was fired, and he was taken into custody.

The incident began about 9:40 p.m., when officers working near Rhode Island Avenue and 38th Street saw two people — one wearing a mask — go into the Lowest Price Gas station convenience store, authorities said. Suspecting a possible holdup, the officers went to intervene, authorities said.

Tippett said the masked man man swung at an officer and ran away. He said the officer chased the man, and when he caught up, the man reached for the officer’s gun. That’s when the officer fired, Tippett said.

Police said Ryan Keith Dorm, 19, of Cottage City was arrested and charged with attempted second-degree assault and attempt to disarm a law enforcement officer. The officer, a 13-year-veteran, was placed on administrative leave, which is routine when an officer discharges a firearm.

Tippett said the other person who entered the convenience store did not run from officers, and he has not been charged with any crimes. He declined to identify the officer who fired, saying the department usually waits until 24 hours after a shooting to do so.