A federal agent is in a critical condition after being shot in the head in Chicago while working undercover on an investigation with local cops.

The agent with the Bureau of Alcohol, Tobacco, and Firearms was shot at 3.15am on Friday in the Back of the Yards neighborhood on the city's South Side and taken to Stroger Hospital.

Luz Campos, who lives near where the shooting took place, told the Chicago Tribune she was in her kitchen when she heard someone say 'open the door' followed by what she thought was the sound of fireworks.

Dozens of extra cops have been deployed in Chicago's South Side where a federal agent was shot in the early hours of Friday morning

The agent with the Bureau of Alcohol , Tobacco, and Firearms was shot at 3.15am on Friday in the Back of the Yards neighborhood on the city's South Side, where cops are pictured

Other locals said they heard a barrage of gunshots, with one woman saying these were too numerous to count.

It is understood law enforcement fired several bullets during an exchange with a gunman or gunmen before the agent was shot. No one has been arrested.

A local officer was taken to hospital for observation but had not been shot, according to Chicago Police spokesman Anthony Guglielmi.

Guglielmi said there had been a 'full deployment' of specialized units to help the ATF investigation, including organized crime units and a saturation patrol.

President Trump, who has repeatedly criticized violence in Chicago, dispatched an ATF team to the city last summer.

Federal agents and local cops have joined together as part of the Chicago Crime Gun Strike Force, which was about 40-strong last June.

There have been a rash of rifle shootings in the city's south side in recent years, with more than 140 people shot, 50 fatally, from fall 2016 to the end of 2017.

It is not known if a rifle was used in Friday's shooting.

There have been a rash of rifle shootings in the city's south side in recent years, with more than 140 people shot, 50 fatally, from fall 2016 to the end of 2017. Pic: Police near the scene

Chicago Police spokesman Anthony Guglielmi confirmed the shooting of an ATF agent, before adding that a local cop had been taken in for observation but had not been shot