A Massachusetts man who climbed through razor wire to escape a detention center in Central Falls last weekend is back in custody.

James Morales has ties to Cambridge and Somerville, Massachusetts where authorities had concentrated their search and where he was eventually captured late Thursday. 

It was after what’s believed to be his second botched bank robbery of the day that James Morales was spotted in Somerville.

State Trooper Joseph Merrick had responded to the attempted robbery at Citizens Bank on Broadway and recognized Morales walking in the area.

Merrick says that as he got out of his cruiser, the fugitive fled. “After a foot chase, a couple of fences,” said Merrick, “I was able to get him into custody with the help of two Somerville detectives.”

Merrick chased Morales down Wheaton Street, where Morales hid under a porch for a time before making another run for it. Trooper Merrick ultimately pulled Morales down off of a fence as the fugitive tried to escape.

Merrick adds, “I believe after the foot chase he was exhausted, so, no, it was not much of a fight.”

It was a brief but exciting scene for the residential neighborhood. Fifteen year old Juliana Rivera was sitting in the car with her mother when police raced by. “We saw all these police cars coming down and it was just so weird,” said Rivera.

Law enforcement officials credit the capture to a joint effort by local, state and federal authorities.

Morales was in federal custody at the Wyatt detention facility in Rhode Island for the theft of weapons from a federal armory in Worcester in 2015. He escaped on New Year’s Eve and had been on the run ever since.

Kevin Neal with the U.S. Marshals Service says his team is ready to take Morales back. “He’ll be held in federal custody,” said Neal, “but at an undisclosed location.”

Morales is due in federal court Friday in Providence to face federal escape charges.