It was "touch and go" overnight for one of two veterans in the San Diego Sheriff's Department injured in a gun battle in Lakeside according to law enforcement officials.
Detective Ali Perez and Sgt. Craig Johnson were shot and injured after confronting a suspect accused of possessing child porn officials said.
Perez was in surgery for hours and was still in ICU Wednesday morning sources told NBC 7 San Diego. He was shot at least twice with a high-powered gun -- including once in the stomach.
Dave Schaller with the Deputy Sheriff's Association (DSA) of San Diego county said Perez suffered severe damage to vital arteries in his arm, as well as some bone damage to his arm and shoulder.
Perez also had a significant amount of internal bleeding. He is heavily sedated, but that he was able to squeeze his father-in-law's hand, according to officials.
Johnson was shot in the arm, and was expected to be okay. He is also heavily sedated, but responsive, according to officials.
On Wednesday morning, officials said that Perez and Johnson remain in the ICU. Perez is critically injured, and Johnson is seriously injured.
The DSA has set up an account at San Diego County Credit Union, under "Detective Ali Perez Support Fund." People can deliver donations to their local SDCCU branch or to the DSA Office in Poway.
The suspect in the shooting, Dan Witczak, 30, of Lakeside, was also hospitalized for a gunshot wound. Deputies would not give details to his condition, other than he remains alive.
Witczak was confronted by the deputies for allegedly keeping pornographic images of his girlfriend's children on his cell phone with the intention of selling them, his girlfriend told NBC 7 San Diego.
Watch Video: Suspect's Background
Lt. Duncan Fraser from the sheriff's department said Witczak used a high-powered rifle to shoot at the deputies.
What was described by officials as a gun battle lasted for about 15 minutes at the Maplewood Apartments near State Route 67 and Mapleview Street around 12:15 p.m. Tuesday.
"It was a long gun battle," said Commander Tim Curran.
Curran said they do not believe any of Witczak's wounds were self-inflicted.
The entire sheriff’s homicide detail was at the location of the shooting overnight interviewing witnesses and executing a search warrant inside the suspect's apartment.
Detective Perez is an 18-year veteran with the department who is assigned to the Child Abuse Unit.
Fraser said he knows Perez well, and that for him to be assigned to the Child Abuse Unit demonstrates that he's "a good detective and has the ability to do a good, thorough investigation."
Johnson is a 23-year veteran with the department who is assigned to the Santee station. His wife also works in law enforcement as an officer with the San Diego police department according to Chief William Lansdowne.
Both have long histories of service with the department. Perez in particular was one of the deputies to find 15-year-old Andy Williams, the suspect in the Santana High School shooting of 2001.
Sheriff Bill Gore arrived at Sharp Memorial Hospital in Kearny Meas around 1:30 p.m. to visit the injured deputies and their families.
Gore said he is "cautiously optimistic" about their recovery, but that he and their spouses are worried about their condition.
"This is a very difficult day for the San Diego County Sheriff's Department and everyone in law enforcement," Gore said to reporters after one of the deputies had just gotten out of surgery. "It’s a constant reminder of what our law enforcement officers in this country face every day."
Keep up to date on breaking news: Download our improved iPhone app, follow us on Twitter @nbcsandiego, fan us on Facebook, sign up for our breaking news e-mail alerts or text SDBREAKING to 622339 to receive text messages for local breaking news. (For more info, text HELP. To end, text STOP. Message and data rates may apply.)