Shares of Nvidia rallied to record highs on Wednesday, with the AI chipmaker’s stock market valuation hitting the $3 trillion mark and overtaking Apple to become the world’s second most valuable company.

The latest rally in Nvidia comes as it prepares to split its stock 10-for-one, effective on June 7, a move that could increase its appeal to individual investors.

The surge in Nvidia’s stock market value above Apple’s underscores a shift in Silicon Valley, where the company co-founded by Steve Jobs has dominated since it launched the iPhone in 2007.

Microsoft remained the world’s most valuable company, with a market value of $3.15 trillion as its shares climbed 1.9%.

Nvidia’s stock has surged 147% so far in 2024, with demand for its top-of-the-line processors far outstripping supply as Microsoft, Meta Platforms and Google-owner Alphabet race to build out their AI computing capabilities and dominate the emerging technology.

It has rallied nearly 30% just since May 22, when Nvidia issued its latest stellar revenue forecast.

In Wednesday’s trading session, Nvidia’s stock briefly hit an intra-day record high of $1,224.50.

The chipmaker’s stock closed up 5.9% at $1,224.40, giving Nvidia a market value of $3.01 trillion.

Apple’s market capitalization closed at $3 trillion as its stock climbed 0.8%.

Nvidia CEO Jensen Huang this week was the subject of wall-to-wall coverage on Taiwanese television and was mobbed by attendees when he visited the Computex tech trade fair in Taipei, where he was born before moving to the United States.

While Nvidia rides a wave of AI enthusiasm on Wall Street, Apple is struggling with weak demand for iPhones and tough competition in China, the world’s biggest smartphone market.

Some investors also view Apple as lagging other technology heavyweights as they rush to build AI features into their products and services.