An Andover teenager who led a group of hackers who made fake threats nationwide has pleaded guilty and been sentenced to juvenile detention. The 17-year-old, whose name was not released, was ordered into the custody of the Department of Youth Services until he is 21 years old, State Police said in a statement.

The teen made multiple “swatting” phone calls, using the Internet to anonymously make hoax threats, including bomb threats, State Police said. An investigation began in April after “swatting” calls were received in Massachusetts and several other states.

Authorities searched the teenager’s home using a dog trained to detect hidden electronic devices, State Police said. In his bedroom, investigators found a router that allows someone to anonymously connect to the Internet.