John Legere, chief executive of T-Mobile. (Scott Eells/Bloomberg)

Federal regulators are slapping T-Mobile with millions of dollars in fines and other requirements after consumers complained that the wireless carrier misled them with its advertising on “unlimited” data.

T-Mobile has agreed to pay $7.5 million to the government and to compensate affected consumers with $35.5 million worth of additional mobile data and discounts on phone accessories.

The federal investigation, which began last year, targeted T-Mobile's marketing of unlimited data plans. Unlike many phone plans with monthly data caps, unlimited data plans generally do not charge overage fees when a customer uses too much data. But the Federal Communications Commission said Wednesday it had received hundreds of complaints about T-Mobile degrading the mobile data connections of its most data-hungry unlimited users.

“According to consumers, this policy rendered data services 'unusable' for many hours each day and substantially limited their access to data,” the FCC said. It added that T-Mobile did not do enough to tell its unlimited data customers that their plans, did, in fact, have some limits.

The news takes on even greater significance in light of the carrier's efforts to promote unlimited data plans to all of its customers. T-Mobile's fine print states that the top 3 percent of data users will temporarily have their network usage de-prioritized — that is, kicked to the back of the line — when other customers are trying to use a heavily congested cell site.

T-Mobile chief executive John Legere said his company's deal with the government was a "good settlement."

Under the terms of the agreement, T-Mobile also will have to provide at least $5 million in free tablets or other devices to children in low-income school districts, as well as free mobile data for their schools and families for four years. As many as 80,000 children are expected to benefit from the program, which begins next October, according to the FCC.

Federal regulators have taken a closer look at “unlimited” data plans and the surrounding marketing. Last year, the FCC proposed a $100 million fine for AT&T over the same issue.

More technology stories:

Apple sends out invites for Oct. 27 event

What the creator of Civilization thinks about VR and driverless cars

Internet mysteries, explained: Why Facebook recommended that 'friend'