This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

DENVER (KDVR) — About 36 hours after a Denver police officer was taken to the hospital, the man accused of shooting him has been arrested.

Pedro Juan Gallegos, 40, is being held for attempted first-degree murder, possession of a weapon by a previous offender and first-degree criminal trespassing.

In an update Monday afternoon, investigators said officers were called to a home in the 4200 block of Alcott Street at 10:55 p.m. for a report of an unknown man in a secure backyard patio area.

Officers arrived eight minutes later, and while they were on the far side of a wrought iron fence a shotgun was fired and hit one officer in the leg.

A separate officer returned fire but did not strike the shooter. Investigators say that officer has not been interviewed yet, but he was wearing a bodycam at the time and that showed the incident.

The suspect ran away while other officers provided first aid, including the use of a tourniquet, to the officer who had been shot.

Officers from the Denver Police Department and several surrounding agencies set up a perimeter in the area. While going yard-by-yard searching for the suspect, a sawed-off shotgun that is believed to be the weapon used in the shooting was found in some bushes. Other evidence was also recovered in the area, investigators say.

About 70 minutes after the shooting a man who matched the description of the suspect was stopped trying to ride a bike out of the area. He was later identified as Gallegos and brought into the department because he had two warrants from outside of Denver.

“That’s awesome work, I’m really happy,” resident Steve Mullen said. “I talked to some of the officers, and they just looked so concerned over what they were doing.”

While he was being held, officers were able develop probable cause and arrest him as the suspected shooter in this investigation.

During the response, the officer was shot in the leg. He was taken to the hospital in critical condition but was said to be stable after surgery on Sunday. As of Monday afternoon, he remains in critical condition.