DETROIT (AP) — A young Detroit-area man who snapped a photo of a gang chart while cleaning an FBI office and posted it on social media was sentenced Tuesday to probation.

Publicizing the chart could have caused a “bloodbath,” said U.S. District Judge Linda Parker.

READ MORE: MRLA Offering Free Food Safety Classes for Kids

Parker said it was a serious case, but she turned down the government’s request that Anthony Cassani be locked up for three months.

“I don’t think you need to be incarcerated to understand the gravity of what you’ve done here,” the judge said.

In 2020, Cassani, 22, was cleaning an FBI office to reduce the risk of COVID-19 when he saw a chart of Detroit gang members. He admits taking a picture of the chart with his phone and posting it on Snapchat.

It could have gone “horribly wrong” if “search warrants were executed and the targets of the search warrant were prepared for the agents to come in,” Assistant U.S. Attorney Eaton Brown said. “We’re thankful that’s not what happened.”

Cassani pleaded guilty to a misdemeanor.

READ MORE: Whitmer: $32M Investment To Recruit, Retain Police Officers

“Mr. Cassani is like a lot of young men who react impulsively and immaturely. … It’s unlawful, its wrong,” said defense attorney Mark Gatesman, adding that young people “live their lives online.”

Cassani apologized and acknowledged the potential harm.

“I fully realize that what I did was not simply theft of government property,” he told the judge.

Parker noted that Cassani has family support and a job. She ordered 60 hours of community service and counseling to control impulsive behavior.

“You’re not living your life on some kind of reality show. What you do in real life has real consequences,” the judge said.

MORE NEWS: Deputies Find Human Remains In Mid-Michigan Soybean Field

© 2021 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.