Discounts on older versions of the iPhone, aimed at preventing customers from switching to archrival Verizon, helped boost second quarter sales at AT&T.

The Dallas-based telecom giant, whose AT&T Mobility unit is based in Atlanta, said total sales rose 2.2 percent to $31.5 billion for the quarter ended June 30. Wireless revenue gained 9.5 percent.

AT&T reported a continued increase in smartphone sales and new iPhone customers, and it said total wireless subscribers grew by 1.1 million to 98.6 million.

This was the first full quarter where AT&T did not have exclusive rights to the popular iPhone. The company dropped the price of an older version of the iPhone to $49 to keep customers from going to Verizon, the nation’s largest mobile phone company.

AT&T also reported a 202,000 net gain in subscribers to its heavily promoted U-verse television services. U-verse had 3.4 million subscribers at the end of the quarter, AT&T said.

The company’s net profit fell 10 percent to $3.59 billion, or 60 cents a share, compared with $4 billion, or 67 cents a share a year earlier. Earnings during the year-ago period were boosted by the sale of stock in Telmex Internacional.

AT&T is the nation’s second-largest wireless carrier. The company announced this spring its plans to buy T-Mobile USA in a $39 billion deal.