Updated

Three Immigration and Customs Enforcement agents were shot and injured Thursday while serving "high-risk" warrants during an early morning sweep of San Francisco Bay area gang members, authorities said.

The agents suffered non-life-threatening injuries after being shot with an assault rifle and were hospitalized in stable condition following the incident in Petaluma that was in connection with the investigation of a 2010 gang-related triple homicide in South San Francisco.

"We owe them a debt of gratitude," U.S. Attorney Melinda Haag said at a Thursday news conference in nearby South San Francisco. "My office is proud to be associated with professionals who put their lives on the line to protect others."

Thirteen men were arrested -- many members of the 500 Block/C Street gang -- during Thursday's sweep that also included two other cities. They are among 19 who were indicted last week on charges including racketeering and murder.

Four of the men charged with murder in the triple homicide could potentially face the death penalty, if convicted. Fifteen of the 19 are expected to make their first appearance in Federal court on Friday.

More On This...

"This indictment and the related arrests serve as a warning to local gangs about the consequences of using violence and fear to maintain control of their so-called turf," Clark Settles, Special Agent in Charge for Homeland Security in San Francisco, said Thursday.

During Thursday's early morning raid in Petaluma, several witnesses reported hearing gunshots and loud sounds around 4 a.m. as one of the agents shot was airlifted from the scene.

Caroline Uland, who lives nearby, told the Press Democrat of Santa Rosa that she was awakened by an explosive sound.

"It was kind of frightening," she said.

Bob Everhart, the manager of a nearby Best Western Hotel, told the newspaper that he heard multiple gunshots, some yelling and then a second round of gunfire.

When he went out to investigate, he was ordered to go back in.

"The neighborhood was on lockdown at that point," Everhart said.

A police officer told Everhart around 6 a.m. that guests could eventually leave their rooms to get breakfast.

Joseph Sullivan, who lives in the area, said that an unidentified man, a woman and two children under the age of 12 lived at the house where the raid occurred.

Several other neighbors also said cars came to and from the house frequently, sometimes double-parking in the street.

"To be honest, I thought they were selling weed out of the house, but obviously something more crazy was going on," Sullivan said.

Dozens of officers -- some in SWAT gear -- swarmed the area early Thursday centered on the probe of a December 2010 drive-by fatal shootings in South San Francisco.

Gonzalo Avalos, 19, Omar Cortez, 18 and Hector Flores, 20 -- who police said were alleged gang members -- were gunned down while walking with a group after four men riding in a brown Chevrolet Impala with tinted windows drove up and opened fire.

Three others were also wounded in the 2010 shootings. South San Francisco police Lt. Alan Normandy said Thursday that the triple murder investigation subsequently expanded to include other agencies, including the Department of Homeland Security.