Verizon Communications has swung to a fourth-quarter profit as it continued to add wireless customers at a healthy clip.

The New York company on Tuesday posted a net income of $7.9 billion, or $1.76 a share, compared with a year-earlier loss of $1.9 billion, or $1.48 a share. Because of the shared ownership of Verizon Wireless with Vodafone, the actual net income attributable to Verizon is $5.07 billion.

Its current results include an after-tax gain from an adjustment to its benefit and pension plans, without which the company earned 66 cents a share.

Its revenue, meanwhile, rose 3.4 percent to $31.07 billion.

Analysts, on average, expected the telecommunications company to post per-share earnings of 65 cents and revenue of $31.02 billion, according to Thomson Reuters.

Verizon, like its peers, has been feeling the competitive pressure in wireless, largely applied by smaller T-Mobile, which has introduced a series of aggressive price moves and features in a bid to win over customers. The latest, an offer by T-Mobile to pay off a family's early-termination fees, has some of the larger competitors shifting their own plans around.

Unlike some of its other competitors, Verizon has been able to stay above the fray, and hasn't suffered the kind of customer losses to T-Mobile that AT&T and Sprint have.

In the fourth quarter, Verizon showed a net gain of 1.7 million retail connections, but that number is likely propped up by traditional smartphone customers as well as more tablets, wireless hot spots, and other devices. It added a net 824,000 phones and a net 625,000 tablets in the period. Of that 1.7 million, 1.6 million signed a contract with the carrier. In total, it ended the year with 102.8 million retail connections.

Wireless revenue rose 5.7 percent to $21.1 billion from a year ago.

Verizon's customer turnover rate ticked up 1 basis point to 0.96 percent from a year ago, suggesting a hint of pressure. The company said that 70 percent of its retail contract base now use a smartphone. In total, it activated 8.8 million smartphones in the period, down 1 million from a year ago.

Beyond T-Mobile, Verizon has seen an assault on what had been a core selling point of the service: the reliability of its network. AT&T has recently begun touting itself as the nation's most reliable network, an honor Verizon has long claimed for itself. Indeed, Verizon late last year admitted to network issues in its bigger cities, but said it was working to fix them.

Its wireline business, meanwhile, saw revenue rise 6.4 percent to $3.8 billion. It added 126,000 net new Fios Internet connections and 92,000 net new Fios Video customers. In total, it ended the year with 6.1 million Fios Internet customers and 5.3 million Fios TV customers.

Verizon's Shammo said the company would spend between $16.5 billion and $17 billion on capital investments this year.

Updated at 7:17 a.m. PT: To include the income attributable to Verizon, as well as add additional stats.