A traffic stop outside a liquor store along Federal Boulevard on Tuesday led to a shootout that left a Denver police officer in critical condition and a wounded suspect in custody. Police said they were still searching for one other possible suspect. Witnesses described hearing dozens of gunshots before Officer Tony Lopez Jr. radioed that he had been hit.

Lopez, a seven-year veteran of the department, underwent hours of surgery for multiple wounds to the upper and lower parts of his body. Doctors were “cautiously optimistic” about his prognosis, said Kelli Christen sen, a spokeswoman for Denver Health.

He “tolerated the surgery well,” Christensen said.

Hours after the shooting, the gray, unmarked police car that Lopez was driving was pulled onto a curb of the Federal Cut Rate Liquor store near West 37th Avenue and Federal Boulevard. What appeared to be bullet holes could be seen on the car’s driver-side door and window.

A man in the shootout with Lopez fled in a white SUV but abandoned the vehicle about two blocks away, near Federal Boulevard and Denver Place, and ran away, said Sonny Jackson, a Denver police spokesman.

The gunman then carjacked a vehicle in a bank parking lot in the 3400 block of West 38th Avenue, Jackson said. Officers spotted the carjacked vehicle and stopped it downtown near 20th Street and Chesnut Place, about 2 miles from the original scene.

The suspect’s name was not released Tuesday night. He had been shot in the ankle, Jackson said, and was taken to a hospital. His injuries are not life-threatening.

The victim who was carjacked was not harmed, Jackson said.

On Federal, at the scene of the original, routine traffic stop, the entire block was cordoned off with yellow police tape, and officers spread throughout the surrounding neighborhood as they investigated the shooting. Blue evidence markers were scattered across the liquor store parking lot.

The shooting happened after a traffic stop at 11:21 a.m., Jackson said. Lopez was wearing a bullet-proof vest at the time.

“At 11:23 he called out that he had been shot,” Jackson said. “At this point, we don’t know what transpired between 11:21 and 11:23 that led to the shooting. We’re investigating that.”

Lopez, who has been at the department since 2008, is assigned to District 1, which covers northwest Denver. His father is Tony Lopez Sr., the commander of District 6, which covers downtown Denver.

Tony Lopez Jr. graduated from Metropolitan State University of Denver in 2008. In 2013, he was awarded the department’s Distinguished Service Cross, which is presented for acts of gallantry.

Lopez is a member of District 1’s Special Crime Attack Team. The department’s SCAT officers do not respond to 911 calls but are assigned to special enforcement details to combat crime in their districts. He was wearing a police uniform while on duty.

Some members of his family were at the hospital, where Lopez was listed in critical but stable condition.

Lopez suffered multiple gunshot wounds, and the most critical injury, Christensen said, was to the femoral artery in his leg.

“The repair to that artery is what took so long in surgery,” Christen sen said.

“We’re all hopeful that the leg will be saved, but I think it’s just too soon to tell,” she said.

It was the second time in a week that a Denver police officer has been shot. Last week, an officer was shot in the leg during a shootout in the Sloan’s Lake area that left a fugitive suspect dead.

Residents of the neighborhood were rattled by Tuesday’s shooting. Many peered out their windows and stood on porches as they watched officers search for evidence.

“It’s scary. This is normally a peaceful area,” said Thomas Peebles, who works in an emissions testing facility across the street from the site of the shooting.

Peebles said he heard 20 to 30 shots.

Lenny Atencio went to the grocery store Tuesday morning and came back to find police swarming his neighborhood, and he was unable to reach his home because of closures.

Atencio said his neighborhood is typically quiet and has “gotten better” over the past few years.

“It makes me feel bad,” he said after the shooting. “It’s scary to come home to this.”

Jesus Diaz-Deleon has lived on the corner of 37th and Federal and worked a few feet away in a tire shop for more than 20 years. Tuesday morning, he heard about 30 to 40 shots rights outside his door, he said.

“It’s no good to have this happen here,” he said. “The way I see it, this community is not safe. It’s not peaceful. But it’s too expensive to live anywhere else.”

Diaz-Deleon said this is the third shooting he can remember in this location throughout his time living here.

Jason Bryant stood on his front porch and peered over at the swarm of police and crime scene tape to the left of his home.

Bryant heard a succession of loud shots and came outside to see a police officer on a stretcher.

“I lived in Five Points for a few years, so I’m used to hearing shots, but never this many or this loud,” he said. “It’s pretty startling. This happens every day now.”

The woman who was allegedly carjacked by the suspect told Denver’s Channel 7 she was in the drive-through line at the bank when a man opened the passenger door and got in her Toyota Carolla.

“”I’m really scared for myself and my family,” she said.

The man was insisting that the woman drive off, she told Denver7. She started screaming and the man violently pushed her out of the driver’s door.

“I got really scared, it was terrible,” she said. “I thought I was going to die.”

Bank employees ran out of the bank to help the woman.

Elizabeth Hernandez: 303-954-1223, ehernandez@denverpost.com or @ehernandez

Staff writers Noelle Phillips, Kirk Mitchell and Kieran Nicholson contributed to this report.