Authorities have captured a prisoner who escaped from federal custody in Somerville. 

At 6 a.m. on Friday, Gabriel Castillo Perez, 18, escaped during a Homeland Security gang sweep, according to the Somerville Police Department. 

Perez escaped as Homeland Security officers were transferring to him to sheriff’s deputies who planned to drive him away from the scene. 

Perez had last been seen on Linden Street after he fled behind the Somerville Police Department. 

Perez went to a place in Everett where he still worked, but police were able to track him down. Perez was recaptured shortly before noon as he was waiting for a bus, still wearing handcuffs. 

Police believe a friend drove Perez to Everett.

Officials say their close contacts within the community helped track him down. Police say it’s believed he was still in handcuffs following his escape.

Perez had been charged with assault and carrying a dangerous weapon. Officials say he is part of the MS-13 gang, but was not the target of a gang sweep on Friday. 

Perez will be deported, according to federal immigration authorities. 

(Copyright (c) 2016 Sunbeam Television. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox