D.C. police said yesterday that a 17-year-old youth who was shot when he tried to rob an off-duty police sergeant early Thursday was brandishing a gas-powered pellet pistol in the aborted holdup.

The pellet pistol resembles a regular handgun, said police spokesman William White III. White said that Sgt. Jimmy Flournoy believed the gun to be a regular handgun when he shot Ernest W. Brooks once in the neck.

"It closely resembles an authentic firearm," White said of the pellet gun, which uses carbon dioxide gas to shoot small metal pellets and is similar in power to a BB gun.

The shooting occurred at 12:50 a.m. Thursday in a relatively darkened area outside a liquor store in the 4400 block of Southern Avenue SE. Brooks was pronounced dead at D.C. General Hospital an hour later, police said.

A police source said that it was uncertain whether the pellet gun was operable, and that it would be tested by police.

Brooks, an Eastern High School sophomore who lived at 1307 45th Place SE, approached Flournoy, pulled out the pistol and announced a robbery, police said. The two struggled briefly, then the officer drew his revolver and shot once, striking the youth in the neck.

Dr. Michael Bray, a deputy D.C. medical examiner, said the bullet entered the front of the youth's neck.

D.C. law treats pellet guns about the same as regular firearms, White said. For example, city law bars carrying pellet guns outdoors, along with other firearms, unless the person is going to a shooting gallery, police said.

Brooks' mother, Rosanna Brooks, said that her son left home a short time earlier to make a telephone call to his girlfriend from a pay telephone. A police source said Flournoy was using the pay phone at the time of the incident.

Brooks used to take the drug PCP regularly, but spent 16 months in the last two years in drug rehabilitation programs, and successfully graduated three months ago from the Second Genesis program. Brooks' mother and some of his friends said they doubt that he was committing a robbery, because they said he had money, was off drugs and had no interest in crime.

"He was a very quiet, very gentle young man," said one friend who did not want to be identified. "A robbery -- that doesn't sound like Ernest."