SAN FRANCISCO — Apple’s sales of older, less expensive iPhones climbed in its latest quarter, highlighting the challenges facing the world’s most valuable technology company as it tries to reverse a recent decline in its earnings and prove that it can still innovate.
The results announced Tuesday topped the projections of analysts who steer the way investors tend to react to financial reports. That helped lift Apple Inc. stock by $16.39, or nearly 4 percent, to $435.38 in extended trading after the numbers came out. The shares still remain down more than 35 percent since the latest model of the iPhone came out 10 months ago.
The downturn largely reflects the intensifying competition in the smartphone and tablet computer markets. Apple defined and then dominated those markets for several years to propel the company into a hyper-growth phase that enthralled Wall Street. But there are now signs that Apple’s once seemingly irrepressible growth is stalling as rivals such as Google Inc., Samsung Electronics, and Amazon.com Inc. make inroads largely by undercutting Apple’s prices.
The competitive pressure has prompted Apple to sell older models of its iPhones at prices below the newest model and introduce a smaller, less expensive version of its iPad.
The impact of that shift can be seen in Apple’s fiscal third quarter, a three-month period ending in June.
It marked the second straight quarter that Apple Inc.’s earnings have fallen from the previous year after a decade of steadily rising profits. The company earned $6.9 billion, or $7.47 per share, in its fiscal third quarter, a 22 percent drop from $8.8 billion, or $9.32 per share. The earnings topped the analysts’ estimate of $7.31 per share.
Apple’s revenue during the quarter barely budged from last year, resulting in the smallest gain since the Cupertino, Calif., company unleashed a mobile computing revolution with the iPhone’s debut six years ago.
Revenue was $35.3 billion in the latest quarter, versus $35 billion a year ago. Analysts had projected that revenue would be unchanged from a year ago.
In a Tuesday research note, Topeka Capital analyst Brian White said the quarter ending in September will cap ‘‘a year to forget’’ for Apple. He is counting on the company to do better next fiscal year, largely because he believes Apple will invent a new line of devices.
Apple hasn’t released a breakthrough product since the iPad came out three years ago, raising concerns the company has lost its touch since the October 2011 death of founder Steve Jobs.
Tim Cook, who succeeded Jobs as Apple’s CEO, tried to assure analysts that the company can still innovate, echoing a common theme he has raised in other public appearances this year.
‘‘We are working on some things we are really proud of,’’ Cook said Tuesday. ‘‘We will see how it does and announce things as we are ready.’’
There has been recurring speculation that Apple is working on a high-tech watch that can be tethered to an iPhone to allow people to see important updates and other online information simply by looking at their wrists. Both Jobs and Cook have hinted in past years that Apple is working on a new product that will revolutionize televisions the same way that the company changed the way people use phones and tablet computers. Cook didn’t mention a watch or new TV product Tuesday.
‘‘Apple is clearly in between innovation cycles, so Wall Street is going to hyperventilate,’’ Forrester Research analyst Frank Gillett said.