In this photo illustration the Social networking site Facebook is displayed on a laptop screen on March 25, 2009 in London, England. Dan Kitwood/Getty Images

An Illinois who was wanted for robbery unwittingly gave away his location to police on social media and was subsequently arrested Monday. Jalen Anderson, 18, was streaming from an apartment in Freeport, Illinois using Facebook Live when a detective with the Freeport Police Department recognized him and figured out where he was streaming from, My Stateline reported.

The Freeport Police Department detailed the incident on its Facebook page Wednesday. One of the department’s detectives was scouring the internet for leads when he found a man streaming on Facebook. The detective recognized the streamer as Anderson, who was wanted for armed robbery by the police department in Harvey, Illinois.

The detective continued watching the stream and noticed Anderson appeared to have a gun and drugs. Police were able to deduce the general area Anderson was located in from the stream and sent a unit to apprehend him. According to the Freeport PD’s statement, the stream continued while officers arrested Anderson.

A search was then conducted at the apartment, which turned up a loaded pistol and Xanax. Anderson was charged with possession of a firearm and a controlled substance, per My Stateline.

This incident was the latest to illustrate the relationship between law enforcement and Facebook’s streaming tools, which are available to every user on the popular social network. With the press of a button, a Facebook user can stream video from their mobile device or computer to a public audience.

In June, a Florida man was arrested for allegedly dealing drugs based on what police saw in a Facebook Live stream. That same month, Buzzfeed noted that a number of violent incidents had been captured using the streaming software since its launch in late 2015. Perhaps the most notable example would be the fatal police shooting of Philando Castile during a traffic stop in Minneapolis in July 2016. The event was captured on Facebook Live, but officer Jeronimo Yanez was found not guilty on all charges.