The news sent its stock sliding and raised fears that the slump was a precursor to global economic decline. Apple reported that its sales in the China region fell by nearly 27 percent that quarter, contributing to a slight decline in its overall profit.

But since then, Apple’s business has rebounded, the global economy has remained largely stable, and the company’s stock has roughly doubled. On Tuesday, Apple said its sales in the China region increased for the first time in five quarters, growing 3.1 percent. Mr. Maestri, the Apple executive, attributed the company’s improving fortunes in China partly to the strengthening economy there.

Apple’s revenue rose by almost 9 percent to $91.8 billion. The company forecast that its revenue would rise 9 percent to 15 percent in the current quarter.

Timothy D. Cook, Apple’s chief executive, said on a call with analysts that Apple’s forecast was less precise than typical because the company was uncertain about the impact from the rapidly spreading coronavirus.

In addition to its large sales presence in China, Apple also assembles most of its products there. Mr. Cook said that some Apple suppliers would remain closed into February as a precaution from the virus, and that traffic into its retail stores in the country had also fallen off.

Apple shares rose about 2 percent in after-hours trading.

Apple’s recent success on the stock market has reflected a number of good signs for its business, including easing trade tensions between China and the United States. Apple is among the companies with the most at risk in a trade war between the two countries, given its enormous manufacturing and sales presence in China.

In the latest quarter, Apple debuted one of its biggest efforts to expand its services business: Apple TV Plus, a package of exclusive TV shows produced by Apple that costs $5 a month, cheaper than most offerings from rivals.