SOMERVILLE, MASS. (WHDH) - An escaped inmate who broke out of a Rhode Island detention center on New Year’s Eve was captured Thursday after a massive manhunt that involved federal, state and local authorities from Massachusetts and Rhode Island.

State Police said James Morales, 35, was captured in Somerville shortly before 4 p.m. Police believe Morales attempted to rob the Century Bank in Somerville before troopers spotted him on Broadway.

Morales was captured by Trooper Joseph Merrick after a brief foot pursuit as he attempted to jump a fence near Foss Park, police said. Witnesses in the area said they saw Morales jump over several fences in an attempt to evade police.

On Thursday morning, a man matching Morales’ description tried to rob a Bank of America on Massachusetts Ave. in Cambridge, sparking a widespread search of the area. According to officials, the suspect passed a note demanding cash at the Bank of America. Officials say he did not get any money before fleeing on foot.

Somerville Mayor Joseph Curtatone said the community was tense as crews searched for Morales, but that he is thankful for the work done by law enforcement. Officials in Somerville spoke about the capture on Thursday.

Morales will be booked Thursday evening at the police barracks in Medford. A news conference will be held later, authorities said.

No injuries were reported over the course of the six-day manhunt.

Morales escaped the Wyatt Detention Facility in Central Falls on New Year’s Eve by climbing a basketball hoop to reach a rooftop, cutting through a fence and climbing through razor wire.

Morales, a former Army reservist, was charged with stealing 16 guns from a U.S. Army Reserve Center in Worcester in 2015 and is also facing child rape charges in Massachusetts.

Before Thursday, Morales was last seen in Framingham, where police said he ditched a car that he stole in Attleborough. Police said the car, found on Gordon Street, had a license plate that had been stolen from an apartment complex on Route 9. A reverse-911 call was sent to residents in Framingham, reminding them to be vigilant.

Related: 4 workers at detention center placed on leave after inmate escapes

An emergency meeting for the detention’s center board of directors was held Thursday to discuss security matters after Morales was able to escape. Luke Gallant, chairman of the board directors at the facility, announced that four workers were placed on leave as discipline in connection with the escape.

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