A 46-year-old man walking his dog in his Silver Spring neighborhood was shot and seriously wounded yesterday morning by an armed robber who was fleeing a Safeway store he had just held up, Montgomery County police said.

The unidentified victim was in critical condition at Maryland Shock Trauma Center with several gunshot wounds to the torso.

A man was taken into custody after the shooting based on information from witnesses in the quiet suburban neighborhood, police said. County police spokeswoman Ann Evans said Shawn Anthony Bowman, 32, of Washington, was charged last night with armed robbery and attempted murder. Police said they could not determine a street address for Bowman.

Police said the Safeway at 116 University Blvd. W. had been open for about 45 minutes when a man armed with a handgun walked into the supermarket and demanded money from a cashier. After the cashier gave him the contents of a register, the robber ordered the cashier to take him to the manager's office, where he took more money, police said. The amount taken was not disclosed.

The robber fled through a side door of the supermarket and ran down a path into the neighborhood behind the store, Evans said.

The neighborhood resident was walking his small, white poodle just five doors from his house when the robber barreled down the sidewalk toward him. Police said it was unclear whether the man tried to stop the fleeing robber or simply got in his way. Neighbors found the victim lying face down on the sidewalk, bleeding from several gunshot wounds.

"I heard his groaning, and I went out and saw him bleeding," said a neighbor, who asked not to be identified. "There was blood all over his face. He was telling me, 'It hurts, it hurts.' "

"What we don't know is if there were words exchanged" between the assailant "and the shooting victim," Evans said.

Responding to a call from the supermarket manager, police searched the neighborhood. Residents guided police to a man they said they had seen drive by in a white pickup truck as they were setting up a yard sale, police said.

Police spotted the truck and gave chase, pursuing it as it headed across a lawn and became wedged in a narrow driveway between two houses, Evans said.

The man then fled on foot, and police used K-9 dogs to find him behind bushes in the 300 block of Belton Road, Evans said.

The truck has been impounded as evidence, Evans said, and investigators were searching for the weapon used in the robbery and shooting.

The 34-year-old Safeway sits on a parking lot just 100 yards from the Capital Beltway and near the new Montgomery Blair High School. Directly behind the supermarket is a quiet, tree-lined neighborhood of single-family homes, where residents were shocked yesterday by the crime.

"My son heard a pop, pop, pop and told my wife about it, and we didn't think twice about it because it's so safe here," said Eric Gabler, a neighbor of the victim. But moments later, Gabler said he saw police officers outside and realized there had been a shooting. Then he learned that his neighbor, who liked to chat about his garden, had been shot.

"I wish I had been able to be out there and talk to him while he was down on the ground," Gabler said.

"It really is worrisome," said an 82-year-old retiree who lives just a few blocks from the Safeway store. "There's no safe neighborhood."

Staff writers Mary Louise Schumacher and Allan Lengel contributed to this report.