Aramco is enormously profitable, earning net income of $111 billion in 2018, but the company will be selling shares in a tough environment. Oil companies are out of favor with investors, who worry that concerns about the role of fossil fuels in climate change will eventually curb demand for Aramco’s large reserves of oil and gas.

Last week, the International Energy Agency forecast that world oil demand would flatten out in the 2030s, thanks to increasingly efficient car engines and rising use of alternative energy sources.

In the shorter term, there also concerns that the combination of growing oil supplies from the United States, Canada, Brazil and other producers and weaker demand because of a slowing world economy may weigh on oil prices, reducing Aramco’s profitability and potentially threatening its ability to pay the large dividends that it is promising investors.

The aerial attacks on Aramco facilities in September highlighted to potential investors the geopolitical risks of operating in the Persian Gulf. Iran was blamed for the attack, which temporarily forced the company to cut production by more than half.

More broadly, the killing of the dissident journalist Jamal Khashoggi by Saudi agents last year has hurt the reputation of Prince Mohammed, and may repel some investors.

The money raised will probably go not to further investment in Aramco but to the Public Investment Fund, a sovereign wealth fund that has become the crown prince’s main vehicle for reshaping the Saudi economy. The fund has been investing in technology companies like Uber, and it is also backing large real estate programs in the kingdom in an effort to attract tourists and new businesses.

Despite the frustrations of a process interrupted by stops and starts, Aramco has had little trouble recruiting some of the world’s major financial institutions to help sell its stock. Citigroup, JPMorgan, Goldman Sachs, HSBC and Morgan Stanley are all listed as financial advisers in the offer documents.