Apple Inc. (NASDAQ:AAPL) on Tuesday posted fiscal second-quarter revenue that beat Wall Street's expectations thanks to strong iPhone and iPad sales.

Profit, however, declined for the first time in a decade. Apple earned $9.5 billion, or $10.09 a share, in the quarter, down from $11.6 billion, or $12.30 a share, a year earlier.

The company reported better-than-expected second-quarter revenue of $43.6 billion, beating Wall Street's average forecast of $42.3 billion, according to Thomson Reuters I/B/E/S.

Apple's gross margin for the quarter was 37.5 percent -- at the low end of the company's forecasted range from January, MarketWatch reported.

Before the report came out, some analysts said continued gross profit margins below the 40 percent range could further add to the negative sentiment around Apple’s shares, which are down about 42 percent from the peak of $700, reached last September.

Shares of the company, which were halted before the release of its earnings results, jumped 5.6 percent to $428.70 in after-hours trade.

One closely watched data point, iPhone shipments, slightly surpassed estimates with 37.4 million units shipped, up from consensus estimates of 36 million.

The company also announced it would increase the cash it plans to push back to its shareholders to a total of $100 billion, including purchasing shares back from investors in a program it called the largest in corporate history, the San Jose Mercury News reported.

The tech giant increased its plans by $55 billion through its dividend and share-repurchase program. Apple will increase the dividend it pays to investors by 15 percent to $3.05 per share while committing an extra $50 billion to buying back shares.

The company's shares, which last week closed below $400 for the first time since December 2011, rose briefly. But they retreated after Chief Executive Tim Cook told analysts on a conference call that "some really great stuff" was coming in the fall and 2014, Reuters reported. That suggested Apple would have no new products in the market for the next few months.

Apple relies heavily on new-product launches to drive revenue growth. It recently refreshed its offerings in October, unveiling the 7.9-inch iPad mini and an updated full-size iPad.

The new capital plan came as Apple's fiscal second quarter profit slid 18 percent. While revenue rose 11 percent, it slowed sharply from 2012 and previous years.

Cook also acknowledged that Apple's once stratospheric growth had tempered but stressed that the company's position remained strong.

"Though we've achieved a credible scale and financial success, we acknowledge that our growth rate has slowed and our margins have decreased from the exceptionally high level we experienced in 2012," he said, in an unusually frank admission of the company's less-upbeat circumstances.

In the past couple of years, demand for Apple's iPhones and iPads has tended to ebb ahead of expected launches, which analysts said would hurt its profit for the current quarter.