Even a tech giant like Apple isn’t invincible: The Cupertino-based company’s quarterly revenue declined for the first time in 13 years during the first three months of this year, according to its fiscal Q2 of 2016 earnings report. Weakening iPhone sales were a major factor causing the decline, but the company also blamed ongoing international economic uncertainties. “Our team executed extremely well in the face of strong macroeconomic headwinds,” Apple CEO Tim Cook said in a statement.

Here are the numbers in a nutshell: Apple generated $50.6 billion in revenue during its fiscal Q2 of 2016, which ended on March 31. This is below the $58 billion Apple clocked during the same quarter last year, and notably below analyst expectations: The analyst community had expected Apple to post revenue of $52 billion. The company’s net profit came in at $10.5 billion, compared to $13.6 billion during the same quarter a year ago. This equals earnings of $1.90 per diluted share, compared with $2.33 a year ago.

Analysts had expected $2.00 earnings per share. Apple’s stock was down 8 percent in afterhours trading.

The company sold a total of 51.2 million iPhones during its most recent quarter, compared to 61.2 million during the same quarter last year. iPhone sales declined by 16 percent, and revenue was down 18 percent year-over-year. That’s a significant decline, as the iPhone has been Apple’s biggest money maker for years.

But in light of continued uncertainty in overseas markets and the emergence of budget-priced competitors from companies like Xiaomi, appetite for the flagship device seems to be slowing down. Apple seems keenly aware of this trend, and introduced the budget-priced iPhone SE at the end of March. The introduction was too late to still make a dent in the quarter’s numbers, but Cook said during the companyt’s earnings call that demand for the iPhone SE currently exceeds supplies.

Speaking of China: The country also saw some of the biggest year-over-year decline in revenue, with Apple generating $12.5 billion in revenue in greater China. A year ago, that number still stood at $16.8 billion. Cook blamed much of this on economic weakness in Hong Kong.

Another weak spot in Apple’s earnings report was the iPad. Sales of the tablet have been declining for some time, and Apple’s attempt to turn around this trend with the plus-sized iPad Pro doesn’t seem to have made a dent just yet. Apple sold a total of 10.3 million iPads during its fiscal Q2, which is below the 12.6 million it sold during the same quarter last year. iPad revenue and unit sales both declined by 19 percent.

SEE MORE: Steve Jobs’ Vision Is Still Alive in the iPad Pro: It May Just Be Wrong

The company doubled down on the iPad with a new 9.7 inch iPad Pro it introduced in March. The model may have come too late to make a significant dent in the quarter’s numbers, but Cook suggested that it may be able to boiost iPad sales in the coming quarter. “We continue to be very optimistic for the iPad business,” he said.

Cook highlighted services as a positive spot for Apple during the company’s earnings call, stating that Apple Music now has more than 13 million paying subscribers. Total service revenue was up 20 percent year-over-year, with Apple generating close to $6 billion during its most recent quarter with all of its services combined. Apple also increased sales of its Watch, with Cook saying that it exceeded internal expectations. However, the company has yet to break out sales of the gadget.