A police foot pursuit in the Beverly area of Chicago ended with the alleged perp in custody, reportedly thanks to the accused’s decision to live-tweet the location of his hiding spot.

Assistant State’s Attorney Lorraine Scaduto explained in court last week how the incident began with a series of calls to 911 reporting shots fired, DNAinfo reported. Officers then reportedly arrived on the scene and witnessed Brandon McNeil, 21, running from a vehicle.

According to the prosecutor, officers quickly discovered McNeil was hiding in the basement of a nearby home after seeing a post from his Twitter account that said, “lol look I just left the police they lookin fa me.” Additionally, the prosecutor said McNeil tweeted “I hid the pole, here’s my hiding spot,” while also posting a photo of a gun.

These tweets apparently led police officers to contact a homeowner who allowed the cops to enter her home. Once inside, police say they found McNeil hiding in the basement, and they also found a revolver that matched the one in the photo posted on Twitter.

According to the police report, a defeated McNeil then said, “Yeah, that’s my gun. Let’s go. Take to me jail.”

McNeil was charged with criminal trespass, aggravated unlawful use of a weapon, and possession of a firearm with a defaced serial number. His bail was reportedly set at $50,000.

Have a tip we should know? [email protected]