Massachusetts Secretary of State William F. Galvin filed charges Tuesday against TelexFree, a Marlborough-based online phone service company. Authorities accuse it of running a billion-dollar Ponzi scheme that took nearly $1 billion globally, including $90 million from Massachusetts residents.

The Securities Division's administrative complaint names TelexFree as a pyramid scheme. It primarily targeted Brazilian immigrants.

TelexFree filed for federal bankruptcy protection in Nevada on Monday, the same day Galvin's office prepared its complaint. Company leadership likely anticipated the investigation.

"They clearly are responding to the fact that an investigation was underway," Galvin said Tuesday. "Now the thing is to act promptly and get whatever we can for these people."

The complaint alleges TelexFree engaged in fraudulent offers and sales of unregistered securities, violating Massachusetts law. The scheme moved money from new recruits to those at the top, obscured by telecom and advertising jargon.

TelexFree mirrored older phone card fraud schemes, but expanded through extensive internet marketing. New affiliates paid to join, purchased inventory, and paid again to recruit others. The company promised profits from selling online phone services and advertising placements. In practice, affiliates earned money almost exclusively through recruitment.

Carlos Wanzeler, Carlos Costa, and Jim Merril were the company's three principal operators. They built the operation, but constant recruitment was essential for the scheme to continue. That system collapsed Monday.

CEO Stuart Macmillan, now reportedly in hiding, reassured panicked affiliates Monday and Tuesday that TelexFree would survive its bankruptcy filing and an ongoing SEC investigation. The Massachusetts Securities Division filed its complaint by Tuesday morning.

The bankruptcy filing may complicate efforts to recover victim funds. Galvin's office investigated TelexFree for months, aiming to protect assets before the company's financial collapse. Monday's bankruptcy filing could have thwarted that strategy.

The government's official declaration provides clarity for victims, including the Brazilian immigrant communities specifically targeted. This scheme operated in plain sight for nearly two years before authorities intervened.