Amazon dramatically missed Wall Street’s earnings expectations for the first quarter of 2022, as the world’s biggest online retailer saw a significant deceleration in top-line growth and faced higher costs in the period.

Overall, the company posted revenue $116.4 billion, up 7%, in line with expectations — but representing Amazon’s slowest year-over-year growth rate in two decades. Amazon reported a net loss of $3.8 billion in the first quarter, or -$7.56 per diluted share, its first quarterly loss since Q2 2015. The Q1 net loss included a pre-tax valuation loss of $7.6 billion from its stock investment in electric vehicle maker Rivian (after Amazon recorded a nearly $12 billion bump in Q4 on the Rivian stake).

The ecommerce kingpin’s advertising service sales hit $7.88 billion, up 25% year over year, but analysts expected a higher take. The company first broke out ad revenue with Q4 results. The segment includes sales of advertising services to sellers, vendors, publishers, authors and others through sponsored ads, display and video advertising.

Click here to sign up for Variety’s free Strictly Business newsletter covering earnings, financial news, and more.

Analyst consensus estimates were for revenue of $116.3 billion and earnings per share of $8.36, according to Refinitiv. Wall Street was looking for $8.17 billion on ad sales, according to StreetAccount.

Amazon issued a Q2 forecast below expectations, projecting net sales to be between $116 billion and $121 billion, representing growth of 3%-7% compared with the second quarter of 2021. The company’s stock dropped 9% in after-hours trading on the earnings miss and weak guidance.

“The pandemic and subsequent war in Ukraine have brought unusual growth and challenges,” Amazon CEO Andy Jassy said in a statement. He noted that the company’s consumer business has grown 23% annually over the past two years, pointing to tough year-over-year comparisons.

“Today, as we’re no longer chasing physical or staffing capacity, our teams are squarely focused on improving productivity and cost efficiencies throughout our fulfillment network,” Jassy said, adding that “This may take some time, particularly as we work through ongoing inflationary and supply-chain pressures.”

In February, Amazon announced a rate hike for its Prime membership program in the U.S., from $119 to $139 per year (up 17%), citing benefits including a stepped-up investment in “high-quality digital entertainment.” That, according to the company, included a tripling of TV shows and movies introduced on Prime Video since 2018 as well as rising wages and transportation costs.

In its earnings announcement, Amazon noted that during Q1 it closed the $8.5 billion acquisition of MGM, bringing its catalog of more than 4,000 film titles and 17,000 TV episodes, including franchises like James Bond, Rocky and Legally Blonde. This week, two of MGM’s top film execs resigned: Michael De Luca, the motion picture group chairman, and Pamela Abdy, the motion picture group president.

Amazon also announced that its annual Prime Day shopping event will take place this year in July “in more than 20 countries” so that it will land in the third quarter of 2022, whereas in 2021 the event ran from June 21-22.