Uncovering and explaining how our digital world is changing — and changing us.

AT&T agreed to pay $105 million to settle claims that it allowed third-party companies to bill subscribers for millions of dollars in unauthorized charges, federal and state law enforcement officials announced Wednesday.

Federal Trade Commission and Federal Communications Commission officials alleged that until January, AT&T billed subscribers for “hundreds of millions of dollars” in charges from outside companies. The charges for services like ringtone subscriptions usually cost $9.99 a month and AT&T kept at least 35 percent of the money, federal officials said.

AT&T will pay $80 million to refund money to current and former AT&T customers who were hit with unauthorized charges. States participating in the settlement agreement will get $20 million from AT&T to settle the allegations and the federal government will get $5 million.

AT&T ran afoul of the FTC’s ongoing investigation into wireless cramming and the FCC’s truth-in-billing rules, which require companies to make it clear what consumers are being charged for on their monthly statements.

“Today’s settlement, while focused on the fast-growing mobile industry, underscores a time-tested principle of consumer protection. Consumers must not be charged for goods or services they did not authorize, whether on their mobile phone, shopping online, or in a brick-and-mortar store,” FTC Chairwoman Edith Ramirez said Wednesday.

AT&T subscribers can go to ftc.gov/att for information about the refund program, which the FTC will handle.

In a statement, AT&T said that while it had “rigorous protections in place to guard consumers against unauthorized billing” it also took steps last year to discontinue the practice. “This settlement gives our customers who believe they were wrongfully billed for [premium SMS] services the ability to get a refund,” an AT&T spokesman said.

AT&T’s decision to settle the government’s complaint, instead of fight the allegations like T-Mobile, comes as the company is trying to convince government regulators to approve its $48 billion deal to acquire DirecTV.

Wireless cramming happens when a third-party company places a charge on a subscriber’s mobile phone bill without authorization. These so-called “Premium SMS” charges are often for things like subscriptions to online horoscopes or celebrity gossip. A wireless carrier gets a cut of the take.

The practice has been happening for years but the FTC only began focusing on the issue after receiving hundreds of consumer complaints. Often it can be hard to find information about the charges or details about how to stop them, the FTC says.

The FTC sued T-Mobile in July, accusing the carrier of making hundreds of millions of dollars in fees by allowing known scammers to put fraudulent unauthorized expenses on subscriber bills. T-Mobile denied the charges.

The government’s lawsuit against T-Mobile and settlement with AT&T over wireless cramming charges suggests that Sprint and Verizon Wireless could be targeted next, as all of the major carriers allowed the practice. An FTC spokesman declined to comment. FCC Chairman Tom Wheeler suggested other wireless carriers may also face similar complaints. The AT&T settlement “is not the last time we will act jointly” on this issue, Wheeler told reporters.

In July, a report from the Senate Commerce Committee charged that the country’s largest wireless carriers have known about the problem since 2008 but haven’t done enough to stop it because they receive anywhere from 30 percent to 40 percent of the income, which means hundreds of millions of dollars.

Last year, AT&T, T-Mobile, Verizon and Sprint announced plans to phase out such third-party billing services except in the case of charitable or political giving.

The wireless industry’s trade group, CTIA, has argued that there have been relatively few consumer complaints about wireless cramming, just 373 in 2013, and companies have worked with law enforcement officials to shut down scammers.

(Update: Added comment from AT&T and regulators as well as additional details on how to obtain a refund and possible actions against other wireless carriers.)