Several companies that made over 50 million deceptive robocalls to Massachusetts residents have agreed to settle charges, Attorney General Maura Healey announced Thursday.

Healey joined with 38 other states and the Federal Trade Commission in going after the robocall operation, which collected more than $110 million over a number of years.

In the calls, the companies claimed to be fundraising for various charities, but only gave about 10% of what they collected to the causes. Some charities received as little as one tenth of a percent, Healey said in a written statement.

They also violated federal rules against using soundboard technology, in which an operator plays pre-recorded messages over the phone to trick people into thinking they're speaking with a real person.

In one call posted to YouTube, a woman's voice identified herself as Alice and said she was calling on behalf of the United Breast Cancer Foundation.

"I just wanted to let you know, with Breast Cancer Awareness Month right around the corner, that we're working extra hard to help these ladies," the voice said. "I was just making sure that if I got the envelope out your way, that these women could count on you for a small blessing."

The recorded caller fails to answer some of the call recipient's questions and repeats some phrases verbatim.

In another, a man's voice tried to solicit a donation to support homeless veterans.

"Long story short, we just wanted to make sure that if we mailed you out an envelope, the guys could count on you for something small. That's all. That OK?" the voice asked. In that case, the automated caller had reached a phone number set up with a program designed to fool telemarketers into thinking they'd reached a real person — so a bot was talking to a bot.

The companies also made calls claiming to support victims of house fires, children with autism and other causes.

The criminal complaint said that the defendants called more than 18,000 Massachusetts phone numbers over 100 times in a year and nearly 10,000 numbers three or more times in an hour.

“These companies inundated consumers with more than one billion deceptive and illegal robocalls in order to exploit their generosity and trick them into giving to sham charities,” Healey said in a written statement. “We have worked with our federal and state partners to shut down this operation and protect our residents from being duped by scammers looking to profit.”

Associated Community Services and several related defendants agreed to pay fines and are barred from fundraising or telemarketing work.