A 27-year-old man has been charged with shooting a federal agent Friday in Chicago, The Chicago Tribune reported.

Ernesto Godinez made his first appearance in federal court in Chicago on Tuesday morning. U.S. Magistrate Judge Maria Valdez ordered Godinez, who turns 28 on Wednesday, held in custody until a detention hearing on May 17.

The agent with the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives was working undercover in a joint mission with Chicago police task force officers, WGN reported. The agent, who was shot in the face, was in stable condition and expected to recover, WBBM-TV reported.

The 10-page criminal complaint accused Godinez of forcibly assaulting an ATF agent, adding that two different surveillance cameras captured him in the area where the shots were fired from moments before the agent was wounded at 3:18 a.m. Friday. A camera also caught Godinez running back into his residence “right after shots were detected in the area,” according to the complaint.

Godinez's criminal background includes felony convictions for aggravated discharge of a firearm and possession of an illegal gun, the Tribune reported.