(Andrew Harrer/Bloomberg News)

They've raised prices. They've slowed speeds. But despite their best efforts, the country's biggest cellphone carriers have been unable to kill off the unlimited data plan. Now they're discovering something else: Unlimited data is extremely popular. And it might just be the thing that saves them in an increasingly cutthroat market for wireless services.

After years of trying to shift customers to plans with monthly data caps, companies such as AT&T and Verizon have begun heaping praise on their newest unlimited data plans as consumers have flocked to them. On an earnings call Tuesday, AT&T chief executive Randall Stephenson conceded that AT&T was “probably a little slow” to react to the wave of renewed interest in unlimited data, spurred on in part by rivals such as T-Mobile.

AT&T has mostly recovered from that brief shock, said Stephenson, and the company's investor materials Tuesday cited the unlimited plan's “gain[ing] traction” among consumers as a reason it was able to add 2.1 million wireless subscribers last quarter.

The numbers were even more dramatic at Verizon, where the company credits unlimited data for helping to slow an exodus of customers. While 289,000 wireless subscribers still left the company over the past several months, marking the first time the carrier lost more cellphone customers than it gained, Verizon's new unlimited plans attracted roughly 110,000 new subscribers, according to the company's latest earnings report.

The results appeared to undercut Verizon's claims, made as recently as last fall, that consumers no longer needed unlimited plans.

The plans were once common in the industry. But telecom giants stopped selling them as consumer demand for data grew. Many unlimited customers found themselves signing onto metered plans when prices rose, or abandoning their unlimited plans after running into speed limits. Eventually, the number of those on grandfathered unlimited plans dwindled to a handful. In 2015, just 1 percent of Verizon's customers were on unlimited plans.

That began to change in January 2016, when AT&T dipped a toe back into the unlimited data waters. Consumers would again be allowed to buy an unlimited data plan, the company said, provided that they also purchased one of AT&T's proprietary television services, U-verse or DirecTV.

In the summer, T-Mobile went further, replacing its entire lineup of cellular plans with a single plan known as T-Mobile One. It was more expensive than T-Mobile's metered plans, but it came with unlimited data. Almost immediately, that sparked a dueling offer from Sprint — and before long, the wireless industry found itself in a full-fledged war over unlimited data.

Over the following months, AT&T eliminated the TV bundling requirement. T-Mobile stopped selling any of its old, metered plans altogether. Verizon finally jumped on the bandwagon in February, offering its own unlimited plan. And AT&T began to promote its unlimited plans by throwing in a free subscription to HBO.

That promotion is key to understanding why some telecom companies are growing to love unlimited plans. Accessing the free HBO content required downloading AT&T's new streaming TV service, DirecTV Now. Consumers who took advantage of the offer could watch their HBO without paying for a DirecTV Now subscription if they chose. But the end result was to introduce consumers to a new AT&T product, and the company reasoned that at least some could be persuaded to pay for a DirecTV Now subscription on top of their cellular service.

“It's really important that our unlimited offer is unique and plays to our strengths,” Stephenson said Tuesday, referring to AT&T's growing stake in online media and entertainment. AT&T is  trying to purchase Time Warner, which owns HBO and a slew of other content such as CNN and Warner Bros.

America's top wireless carriers may have been slow to adapt to recent trends. But the companies have quickly come to appreciate their value — whether as a way to stave off bleeding or as a way to develop new business models.