An undercover .C. police officer trying to stop a street robbery at 20th and K Streets NW last night shot and seriously wounded one of two suspects after one of them threatened the officer with a machete, police officers said.

The wounded man, who was described as being in his late teens or early 20s, could not be immediately identified. He was in serious condition and undergoing surgery for a chest would early today at George Washington University Hospital.

Police Capt. Edward J. Spurlock said officers John Sabella and Vasili Katopothis, both dressed in casual clothes, had begun following the two men earlier, believeing they intended to break into cars parked in the downtown area.

When the two suspects disappeared into the shadows of a parking lot of 20th and K streets, one of the officers kept the lot under surveillance by posing as a parking valet at the entrance to a nearby restaurant, while the other stationed himself out of sight around the corner.

After a short time, police officials said, a man approached the intersection, and one of the suspects leaped from the shadows and grabbed him around the neck in an apparent robbery attempt.

As Sabella raced across the street to intervene, the suspect released his intended victim, drew an 18-inch-long machete from his coat and raised it as if to strike the officer. Sabella then fired on shot wounding the man.

The second suspect is still being sought.