Apple got its groove back.

The iPhone maker is poised to overcome recent disappointing sales of its smartphone and will once again post strong sales gains — putting it on a pace to become the first $1 trillion company as soon as May 31, one analyst said Tuesday.

In a note to investors, GBH Insights’ Daniel Ives waved off the iPhone’s recent sales woes and proclaimed that “Apple shares are now on the yellow brick road to hit the elusive trillion-dollar club.”

Apple will hit the 13-digit net worth mark in three to six months, Ives predicted.

The analyst, to buttress his forecast, cited the strong rumors suggesting that Apple has three new iPhones in the pipeline to be released later this year — each expected to feature an edge-to-edge, buttonless display similar to that of the iPhone X.

There will be between 60 million and 70 million Chinese iPhone owners who will be looking to upgrade over the next 12 to 18 months, which will cause a “renaissance of growth” for Apple and push shares “towards the $200 range over the coming three to six months,” Ives said.

Apple shares closed Tuesday at $178.39, down 58 cents.