An off-duty Washington police officer working as a grocery store cashier shot and killed an armed holdup man Tuesday night as he allegedly tried to rob the store.

Detective James O. Johnson, a 15-year veteran of the force, shot Eddie A. Byers, 18, of 68 P St. SW as Byers and a companion tried to leave the Safeway at 3220 Pennsylvania Ave. SE with money from the store's safe, police said yesterday. It was the second fatal shooting of a robbery suspect this month by an off-duty police officer.

Police officials said Johnson, who had stationed himself near the exit of the store as the two robbers tried to flee, identified himself as a police officer and ordered the men to halt. At that point, officials said, Byers pointed a pistol at Johnson and pulled the trigger, but the gun misfired. Johnson then fired one shot, striking Byers in the head, they said.

Byers died several hours later at Greater Southeast Community Hospital.

City law requires police officers to carry their guns with them at all times when they are in the District, even while off duty. Johnson has been placed on routine administrative leave with pay pending a grand jury investigation of the incident.

A second man, identified as Howard Morgan, 23, of 1414 Channel St. SW, was arrested at the scene and charged with assault with intent to rob. A third suspect, who allegedly remained outside the store while the robbery attempt was under way, escaped.

According to reports by police and a store manager, Byers and a companion tried to enter the store in Penn-Branch shopping center about 10:10 p.m. and were told by assistant manager Billy Yuan that it was closed for the night.

Byers then allegedly pulled a gun and, with the second armed robber, forced Yuan into the store's office to open the safe.

Johnson was closing his cash register near the front door. Police said that while the two robbers were in the office, Johnson locked the front door of the store, then shouted to the two men to stop. Both then ran toward the door, police said.

Just over two weeks ago, on March 13, officer Donald Bell shot and killed 19-year-old Leonard Briscoe of 1553 Anacostia Ave. NE outside a convenience store at Eighth and H streets NE.

Bell, who was not in uniform, was working as a clerk in the store when he was approached by Forest Lee Jackson, 24, who complained that he had just been robbed outside, according to police reports.

Bell left the store and found Briscoe allegedly trying to rob a second man. Bell identified himself as a police officer, drew his gun, struggled with Briscoe and exchanged shots with him. Briscoe fled but later died at Capitol Hill Hospital of bullet wounds to the neck.

Bell remains on administrative leave.

The Safeway shooting comes on the heels of Mayor Marion Barry's announcement last week that he is in favor of legislation that would allow off-duty police officers to work as security guards in the District. Current D.C. law prohibits police from taking security jobs but requires them, even while they are off duty, to carry their service revolvers and respond as police officers if trouble arises.

"I would rather work in uniform," said Charles Sanders, a 6th District police officer who also works as a cashier at the same Pennsylvania Avenue Safeway. Sanders says there is no doubt in his mind that a uniformed police guard would have deterred the two men from entering the store Tuesday night.