Two undercover Montgomery County police officers shot and wounded a 22-year-old man yesterday in Gaithersburg after he rammed into three unmarked police cars while trying to flee in a stolen car, authorities said.

Brandt Scott Trillanes, of the 20500 block of Strath Haven Drive in Gaithersburg, was shot multiple times in his arms and legs about 12:15 a.m., in the parking lot of the Gaitherstowne Plaza shopping center in the 200 block of North Frederick Road, police said.

The incident began when Trillanes backed a 1996 Honda Accord into a parking space in front of a liquor store at the shopping center. As it happened, police said, the parking lot was being watched by undercover detectives who were working in the area yesterday because five convenience stores and gasoline stations had been robbed in recent weeks along Frederick Road. Sgt. Darrel Murdock phoned in the license plate number of Trillanes's car and learned that the vehicle had been reported stolen from a Germantown parking lot Oct. 25.

Inside the store, Trillanes attempted to buy a 32-ounce bottle of liquor. But the manager, Lee Sim, refused the sale because the man couldn't produce any identification.

Trillanes left the store and hopped back into the car, just as an unmarked police van parked directly in front. Two more detectives' vehicles cornered the car.

"I saw the van just pop up in front of them. I don't know where the cops came from. I didn't even know it was a cop," Sim said.

Police said that as the officers attempted to apprehend Trillanes, he rammed the car forward, striking the van, then drove the vehicle in reverse, slamming into the store. He drove the car forward again, striking two other police cars. As Officers William Thomas and Steven Phelps stood on both sides of one of the cars, they opened fire. Police said Trillanes was taken from the scene by state police helicopter, but they declined to disclose the hospital where he is being treated. He was in serious condition last night, police spokeswoman Joyce Barrow said.

Police said that Trillanes has yet to be charged and that an investigation is continuing.

Police Chief Charles A. Moose put Phelps, a five-year member of the department, and Thomas, a six-year member, on paid administrative leave while the shooting is being reviewed.

Yesterday's shooting was the second this year by a Montgomery County police officer. In April, an officer shot and killed Junious Roberts, an unarmed 44-year-old Wheaton man, in a McDonald's parking lot.

Police said that shooting was accidental, and Montgomery County Executive Douglas M. Duncan (D) suggested that the department review how officers are trained in using their guns. In August, the Roberts family received a $2 million civil settlement.

Metro researcher Bobbye Pratt contributed to this report.