A former Pentagon guard, on trial for murder in the shooting of an Arlington man, testified yesterday he had reached for his gun when the man threatened him, fired the weapon prematurely and then fled the scene because he "panicked."

"I knew my life was in danger," testified Michael J. Gardner, 31, who is charged in the May 10 death of Orlando C. Dominguez. "I was scared to death. I was shaking. The only thing I knew I could do at the time was to, you know, shoot."

Gardner told an Arlington County Circuit Court jury he fired the single shot at Dominguez, 22, of 955 S. Columbus St., as Dominguez ran toward him in the corridor outside Dominguez's apartment holding a large knife.

Crouching before the jury to show how he bent to pull his gun from a leg holster, Gardner said the pistol had fired as he was standing up. "At the time the weapon discharged, my only thought was protecting my life," he said. "After the weapon discharged, I didn't know I had hit anything or anyone, and I panicked."

Testimony from two children and a woman who were in the apartment at the time of the shooting offered conflicting accounts of the exchange between Gardner and Dominguez that night.

Carla Keastead, 36, who lived in the apartment with her 12-year-old son, testified yesterday she lied to police "because I was scared" shortly after the incident, telling them Gardner threatened Dominguez.

In a tape of Keastead's conversation with police, played yesterday for the jury, she said "[Gardner] was very loud" the night of the shooting, banging on the apartment door, angrily calling names and making threats.

Keastead testified yesterday that only Dominguez made threats. When Gardner knocked at the door and identified himself as a police officer, she told the jury, Dominguez "got very . . . like he was mad, upset, wild-like."

Gardner, who has worked as a police officer with the General Services Administration since 1978, was suspended shortly after his arrest May 11. He was held in Arlington County Jail for a week and released on $25,000 bond.

Keastead testified yesterday that she had known Gardner for three years and lived with him for a year and a half. She said Gardner and Dominguez had never met. At the time of the shooting, she told the jury, Dominguez had lived in her apartment for several weeks.

The trial is scheduled to resume this morning.