An off-duty D.C. police officer shot and killed a man early yesterday after two men tried to rob him at gunpoint in Northwest Washington, police reported.

Police said the victim, identified as William Nergen Blainey, 23, of 406 Orange St. SE, was shot five times at close range during the 12:30 a.m. incident. He was pronounced dead at D.C. General Hospital an hour later, police said. The cause of death was listed as multiple gunshot wounds in the chest and abdomen.

They said the accomplice apparently was not injured and escaped.

Police said the incident occurred as Sgt. Jerry S. McGuire, 34, a 14-year veteran of the department, was getting into his car, which was parked in the 1300 block of H Street NW.

McGuire, a plainclothes supervisor assigned to the 3rd District detectives section, had just gotten off duty, police said, and was returning to his car after having stopped at a local restaurant for a beer.

McGuire had taken off his jacket and thrown his wallet on the front seat when two men, one holding a handgun, accosted him, police said. They apparently did not notice McGuire's revolver in a holster on his right hip, they said.

McGuire offered the men his wallet, police said, but instead of taking it they forced McGuire into the driver's seat and ordered him to slide over to the passenger's side, police said.

As the officer lowered his hands to lift himself over the emergency brake lever, police said, he drew his revolver.

Police said McGuire whirled and fired four shots, striking one man in the chest. The man slumped over in the driver's seat and fell out onto the street, police said.

As McGuire was climbing out of his car, police said, the man raised his gun and the officer fired a fifth shot. The second suspect ran.

Police said that McGuire has been placed on routine administrative leave with pay.