Sixteen people have pleaded guilty in connection to a criminal operation that stole hundreds of thousands of dollars from ATMs and electronics stores in a crime spree that lasted at least four years and spanned six counties, Massachusetts prosecutors said today.

“The convictions we have obtained were the result of countless hours of diligent, painstaking investigative work combined with a commitment to bring these people to justice,” State Police Colonel Timothy P. Alben said in a statement. “It is rewarding to us and, we hope, also to the banks and people who were victimized, to announce these convictions.”

Over several years, investigators built a case against the operation’s ringleader, Miguel Caraballo, 42, of Lawrence, and 15 of his accomplices, according to Attorney General Martha Coakley’s office.

Advertisement - Continue Reading Below

Caraballo pleaded guilty May 22 to 60 separate charges, including breaking and entering in the night time, breaking and entering into a vault, larceny of a motor vehicle, malicious destruction of property, and larceny over $250. He was sentenced to 16 years in prison followed by 10 years of probation.

Caraballo was one of the last defendants to accept a guilty plea, according to Coakley’s office, which has been working to prosecute the 16 people since they were charged in March 2011.

The final defendant pleaded guilty last week. Caraballo received the harshest sentence. Some of the other defendants received sentences as light as probation.

State Police began investigating a number of ATM burglaries in 2007 and soon merged their case with a similar one being investigated by the FBI, Coakley’s office said.

The ring would steal a car, force their way through the back door of an ATM vestibule, and disable the alarm system before using a cutting torch or circular power saw to break into the machine’s money vault.

Often, the mens’ girlfriends would act as lookouts during the crimes, Coakley’s office said.

The group successfully broke into ATMs in Brookline, Acton, Bedford, and Tyngsborough but failed in their attempts to burglarize ATMs in Amherst, Gardner, Fitchburg, and Whately.

Several members also pleaded guilty to breaking into businesses in Dedham, Fitchburg, and Leominster, according to Coakley’s office.