AT&T (T) revealed stronger-than-expected second-quarter profit and sales on Tuesday, citing strength in its wireless business and tighter expenses that gave a boost to margins.

The wireless and wireline provider posted net income of $3.9 billion, or 66 cents a share, up 10% compared with a year-earlier $3.6 billion, or 60 cents. The results topped average analyst estimates of 63 cents in a Thomson Reuters poll.

Consolidated revenues for the three-month period climbed 0.3% to $31.6 billion, narrowly missing the Street’s view of $31.7 billion, according to a Thomson Reuters poll.

The gains were led by 18.8% growth in wireless data revenues, up $1 billion from the year-earlier period, with the help of smartphone and equipment sales, as well as 13.5% growth in strategic business services revenues and 38.3% increase in U-verse sales.

At 30.3%, AT&T reported wireless’ best-ever operating margins, which it attributed to operating efficiencies, fewer handset upgrades and new customers. The carrier reported wireless margin of 45%, topping the consensus of 42.5%.

Smartphone sales reached 5.1 million during the second quarter, compared with 5.6 million a year ago. Branded computing sales, which includes tablets and tethering plans, jumped 50% to 6.3 million. The Dallas-based carrier activiated 3.7 million Apple (AAPL) iPhones compared with 3.6 million in 2011.

The No. 2 U.S. carrier booked the best-ever postpaid, prepaid and total wireless churn and added 1.3 million wireless customers during the period, including 320,000 contract customers, which topped the Street’s view of 233,000.

Wireline consumer revenues jumped 1.7%, their strongest growth in more than four years.

“We executed well across the business and posted another strong quarter with growing revenues, expanding margins and double-digit earnings growth,” AT&T CEO Randall Stephenson said in a statement. “All of these things add to our confidence and enthusiasm looking ahead.”

During the quarter ended June 30, AT&T sold its advertising solutions business, which includes the Yellow Pages, to an affiliate of Cerberus Capital Management for $750 million. AT&T said that excluding the sale, expenses were down 2.3% and sales grew by 2%.

Follow Jennifer Booton on Twitter at @Jbooton