An agent with the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives was shot in the chest and arm Thursday afternoon in Gary when he and his partner were “ambushed” during an undercover operation, officials said.

They said the agent’s partner shot and killed a suspect, who wasn’t identified.

The Chicago Police Department was involved in the operation that led to the shooting Thursday. The department released a statement saying: “Thoughts and prayers for the @ATFHQ Chicago Field Office agent who was shot and critically wounded in Gary, Indiana. ATF Agents are working with us every hour of every day to reduce gun violence in Chicago and it’s beyond a partnership, it’s one team, one fight.”

The agent’s wounds weren’t life-threatening. He was in critical but stable condition Thursday night.

At a news conference in Gary, Brendan Iber, assistant special agent in charge of the ATF, said the agents were “ambushed.” He would not provide more details. Sources said the agents were conducting a gun investigation.

In addition to the suspect who was shot to death, two suspects were arrested and a fourth was on the lam, authorities said.

Lake County, Indiana sheriff’s officers chased a white Kia Optima that fled from a traffic stop and later collided with two other vehicles, injuring passengers and drivers. Authorities are investigating why the driver of the Kia took off and whether the crash was related to the shooting.

On May 4, an undercover ATF agent was wounded in Back of the Yards during an undercover narcotics operation. The agent was shot in the face while he and other agents were putting a tracking device on a vehicle in the 4400 block of South Hermitage.

Ernesto “Ernie’ Godinez has been charged in that earlier case with assaulting the agent, who was released from a hospital a few days after the shooting.

Ernesto Godinez

Ernesto Godinez was charged in the shooting of a federal agent in Back of the Yards. | Chicago Police Department

RELATED STORY: ‘We got the right guys,’ retired ATF agent says of controversial drug stings