NEW YORK — AT&T posted stronger-than-expected earnings for the final quarter of 2013, helped by higher revenue from mobile and Internet service subscribers.

The nation’s biggest telecommunications company said Tuesday that it earned $6.9 billion, or $1.31 per share, in the October-December period. That’s up from a loss of $3.8 billion, or 68 cents per share, in the same period a year earlier.

The latest quarter’s results included a pension-related gain of $7.6 billion, tax expenses and other items. Excluding these items, adjusted earnings were 53 cents per share in the latest quarter, beating analysts’ expectations by 2 cents.

Revenue rose 2 percent to $33.2 billion from $32.6 billion.

Analysts on average were expecting revenue of $33.1 billion, according to FactSet.

AT&T said it added 809,000 net wireless subscribers in the fourth quarter. It added 566,000 wireless devices to its contract-based plans, which are the most lucrative. Of these 299,000 were smartphones and the rest tablets, which carry lower monthly fees than phones. AT&T is the second-largest cellphone company in the U.S. after Verizon Wireless.

Churn, or the turnover rate for contract-based subscribers, was 1.11 percent during the quarter, down from 1.19 percent a year earlier.

AT&T is benefiting from the growing popularity of smartphones and tablet computers, but the company is also facing competition from Verizon Wireless as well as smaller rivals such as T-Mobile and Sprint Corp.

Shares of Dallas-based AT&T fell 61 cents, or 1.8 percent, to $33.09 in after-hours trading following the release of the earnings report. It closed the regular trading session up 19 cents at $33.70.