AT&T Inc reported a higher-than-expected quarterly profit as iPhone sales declined, reducing the amount of cash it had to pay Apple Inc and boosting its margins.

Shares of AT&T rose 1.5 percent after the news. The company and its rivals were weighed down by iPhone costs in fourth quarter, when the latest version of the popular phone hit stores. While fewer iPhone sales meant weaker subscriber growth for AT&T, it did help the company's wireless service profit margin.

Piper Jaffray analyst Christopher Larsen said the wireless margin of 41.6 percent had beaten his expectation for 39.7 percent and was an major driver for AT&T. The margin, based on earnings before interest, tax, depreciation and amortization, was 28.7 percent in the fourth quarter and 39 percent in the year-earlier quarter.

One of the big things is they didn't have such a big iPhone refresh, said Larsen, who added that AT&T results were pretty good across the entire company.

The more often AT&T customers upgrade to a new iPhone, the more it hurts AT&T margins, because an existing customer does not necessarily increase his or her spending, while a new customer will automatically boost revenue.

AT&T, which has been tightening its upgrade policy, said it had activated 4.3 million iPhones in the quarter, down from 7.6 million in the fourth quarter. In comparison, larger rival Verizon Wireless sold 3.2 million iPhones in the latest quarter.

AT&T's net income rose to $3.58 billion, or 60 cents per share, from $3.4 billion, or 57 cents per share, a year earlier. Analysts on average had expected 57 cents per share, according to Thomson Reuters I/B/E/S.

Consolidated revenue rose nearly 2 percent to $31.8 billion from $31.25 billion.

The No. 2 U.S. mobile provider added 187,000 subscribers in the quarter, which was roughly in line with expectations for 193,000 from six analysts surveyed by Reuters. This was much fewer than Verizon Wireless, which reported 501,000 net additions last week.

AT&T shares rose to $31.06 in premarket trading after closing at $30.61 on Monday on the New York Stock Exchange.

(Reporting by Sinead Carew in New York and Sayantani Ghosh in Bangalore; Editing by Ted Kerr, Dave Zimmerman and Lisa Von Ahn)