WASHINGTON — The Consumer Financial Protection Bureau and the Federal Communications Commission are targeting Sprint in an investigation into whether the company illegally billed customers tens of millions of dollars for unauthorized charges related to premium text messages.

The consumer bureau sued Sprint in Federal District Court in Manhattan on Wednesday, accusing Sprint of operating a billing system that allowed third parties to “cram” unauthorized charges onto consumers’ mobile phone bills.

The F.C.C. is conducting a similar investigation, and people close to the investigation said the parties were close to completing a settlement under which Sprint would pay $105 million in refunds and restitution for the unauthorized transactions.

“Consumers ended up paying tens of millions of dollars in unauthorized charges, even though many of them had no idea that third parties could even place charges on their bills,” said Richard Cordray, director of the consumer bureau. “As the use of mobile payments grows, we will continue to hold wireless carriers accountable for illegal third-party billing.”