After Ernesto Godinez allegedly shot an ATF agent in the face last Friday near his home in the Back of the Yards, the area around the crime scene was crawling with cops and federal agents for hours.

Godinez’s older brother, Rodrigo “Gordo” Godinez, apparently feeling their presence, locked the door to the basement of his apartment building in the 4300 block of South Wood — about one block from his brother’s place, prosecutors said at a detention hearing Thursday at the Dirksen Federal Courthouse.

A short time later, federal agents searched Rodrigo’s home and found $8,500 hidden in the basement ceiling.

It did not surprise them.

They were the same marked bills an undercover ATF agent had paid Rodrigo, 37, for about half a pound of cocaine a few days earlier, Assistant U.S. Attorney Nic Eichenser said.

A few feet away, also in the ceiling, was a pistol and several boxes of ammunition, he added.

The evidence was enough for U.S. District Judge Maria Valdez to deem Rodrigo Godinez a danger to the community and order him to remain locked up.

Ernesto Godinez has been charged in the shooting of a federal agent Friday in the Back of the Yards neighborhood. | Chicago Police Department photo

The Godinez brothers are leaders of the Almighty Saints street gang, prosecutors allege.

To drive home the “sway” that Rodrigo has in the neighborhood, Eichenser noted the 40 to 50 people who gathered outside his apartment building when federal agents arrested him.

“Rather than causing a scene,” Rodrigo agreed with law enforcement that “going out the back way was the best option,” Eichenser said.

The gang had come under the microscope of an inter-agency law enforcement task force created last year to combat the city’s gun violence.