UPDATED with details from the company’s investor call.

Apple is closing in on a $1 trillion market cap following a record June-quarter earnings report that exceeded Wall Street’s projections.

The company reported per-share earnings of $2.34 for the third quarter, up 40% from the same time last year and handily beating analysts’ consensus estimates of $2.18.

Revenue reached a record-setting $53.3 billion, an increase of 17% from a year ago and exceeding Wall Street’s projections of $52.34 billion. The June quarter marks Apple’s seventh consecutive quarter of growth.

Investors reacted enthusiastically, driving the stock up 5% in after-hours trading to $195.90 a share. Apple’s market cap sits at $935.3 billion.

“Our Q3 results were driven by continued strong sales of iPhone, services and wearables, and we are very excited about the products and services in our pipeline,” CEO Tim Cook said in a statement accompanying the results.

Apple sold 41.3 million iPhones in the quarter, a modest 1% gain in number of smartphones sold, but a significant 20% increase in revenue — a reflection of a higher average purchase price. Cook said the iPhone X, with its $1,000 price tag, remains a solid performer

Mac sales fell 13% compared to the prior year, a function, Apple said, of the timing of new MacBook Pro. The iPad remained largely flat.

Services and Apple’s wearable devices — dubbed the “other products” in the company’s financials — were the highlight of Apple’s quarterly results.

AppleCare, Apple Pay and other services posted $9.5 billion in revenue, up 31% from the same time a year ago. The category also received a one-time lift of $236 million after settling its long-running legal dispute with Samsung over smartphone design.

The Other category, which includes the Apple Watch, AirPods and the HomePod among other Apple-branded devices and accessories, brought in $3.7 billion in revenue, up 37% from a year ago.

“AirPods a run-away success,” said Apple CFO Luca Maestri. “We’ve been selling them as fast as we can make them since their launch a year and a half ago.”