Saudi Aramco, the oil giant that underpins the Saudi economy, emerged as the world’s most valuable public company on Wednesday as its shares traded for the first time. But the stock offering fell short of the royal family’s goal of luring huge amounts of global investment.

Aramco shares rose 10 percent within seconds after they started trading on the Saudi stock exchange in Riyadh, reaching the largest daily increase permitted. The surge took the company’s value to nearly $1.9 trillion, substantially larger than Apple at about $1.19 trillion.

Crown Prince Mohammed bin Salman, whose reputation was damaged last year by the murder of the dissident journalist Jamal Khashoggi by Saudi agents, will probably claim the I.P.O. as a big victory. The proceeds from the shares sold in the offering — initially estimated at $25.6 billion — will help fund the crown prince’s Vision 2030 plan, which aims to finance vast projects in renewable energy and real estate and reduce dependence on oil.

But the slice of the company being traded is tiny, and the shares are benefiting from the hothouse environment of the local stock exchange, which the Saudi leadership chose over a bigger, more global market. Given the opportunity to buy into a national crown jewel, Saudi individuals and companies lined up to buy the shares. Many major investment funds from outside the region were largely on the sidelines.