AT&T Inc. on Tuesday posted the best profitability ever in its wireless arm, paradoxically because it sold fewer smartphones.

The largest telecommunications company in the U.S. said its subscribers are now holding on to their phones longer: The rate of upgrades to new phones was at a record low in the second quarter.

That’s good news for the company because it to subsidizes each smartphone by hundreds of dollars to be able to sell it to customers for $99 or $199. IPhones, in particular, are expensive to sell, because Apple charges AT&T an average of around $650 for each one.

In March last year, AT&T started telling subscribers that they had to stay on contract for 20 months before they would be eligible for a new phone at the fully subsidized price. Before that, some high-paying customers had been eligible for upgrades after just 12 months.

“It appears our policy is working,” John Stephens, AT&T’s chief financial officer, told analysts on a conference call. He said another big contributor to the low upgrade rate was that many people upgraded late last year, when the latest iPhone debuted.

AT&T activated 5.1 million smartphones in its latest quarter, down from 5.5 million in the same period a year ago. That helped boost wireless operating income by 18 percent in the quarter, to $4.9 billion.

Analysts still expect AT&T’s profits to take a dive this fall, when the new iPhone comes out. In what’s become an annual ritual, buyers flood AT&T and Apple stores, and AT&T pays dearly for the privilege of having the nation’s most popular network for iPhones.

The tighter upgrade policies don’t seem to be scaring off AT&T subscribers. They were more loyal than ever in the quarter, helping AT&T outdo analyst expectations by adding a net 320,000 subscribers on contract-based plans in the quarter.

However, more than half of the new subscribers were tablet users, who pay less than smartphone users. Also, AT&T continues to lag Verizon Wireless, which already has more subscribers. Last week, Verizon reported adding 888,000 subscribers to its rolls in the quarter.

The strong wireless results helped boost Dallas-based AT&T’s net income to $3.9 billion, or 66 cents per share, for the April to June period. That’s up 8.7 percent from $3.6 billion, or 60 cents per share, a year earlier.

For the latest quarter, analysts expected earnings of 63 cents per share.

Revenue edged up 0.3 percent to $31.6 billion. Analysts were expecting $31.7 billion. If it weren’t for the sale of its phone-books business in May, revenue would have risen 2 percent.

AT&T sold a controlling stake in the Yellow Pages division to private-equity firm Cerberus Capital for $950 million. The unit was profitable but shrinking, and AT&T wants to be a growing company.

AT&T’s stock slipped 95 cents to $34.43 in midday trading Tuesday, retreating from levels close to its three-year high of $36.21, hit three weeks ago.

The traditional, non-wireless phone company side of AT&T still accounts for nearly half of the company’s revenue. It’s in decline, but the rate of decline slowed down in the second quarter, as the division that sells telecommunications services to businesses did well, and AT&T continued to sign up households to its U-Verse TV service.