A United Nations investigation to be released Wednesday will report that Amazon founder Jeff Bezos’s cellphone was hacked in 2018 after he got a WhatsApp message that came from an account purportedly belonging to Saudi Crown Prince Mohammed bin Salman, according to a person with direct knowledge of the report.

The report is expected to detail a forensic investigation into long-standing allegations by Bezos, the world’s richest man, that the Saudi launched a cyberattack on him as part of a complex series of conflicts among Bezos, the Saudis, President Donald Trump and the National Enquirer tabloid.

A U.N. official, special rapporteur David Kaye, says in a new documentary film that Bezos’s phone was infected with malware that was delivered via a message from Mohammed. Soon after the message was sent, investigators concluded, a massive amount of data was extracted from Bezos’s phone.

The Guardian newspaper, which first reported Mohammed’s alleged involvement Tuesday, said Bezos and the prince, often referred to as MBS, were engaged in a friendly chat on WhatsApp on May 1, 2018, when Mohammed sent Bezos an apparently infected video file.

Bezos, who owns The Washington Post, has alleged through his security consultant, Gavin de Becker, that the Saudi government had “access to Bezos’s phone, and gained private information.” De Becker has written that the Saudis were “intent on harming Jeff Bezos since . . . the Post began its relentless coverage” of the killing of Jamal Khashoggi, a Post contributing columnist, in October 2018.

After Khashoggi was killed in Istanbul, Bezos became the target of waves of criticism from Saudi-based online trolls.

But the alleged hacking of Bezos’s phone took place five months earlier.

A spokesman for Bezos, Jay Carney, declined to comment. Agnes Callamard, the U.N. special rapporteur on extrajudicial, summary or arbitrary executions and one of the authors of the forthcoming report, declined to comment Tuesday evening and said she will issue detailed findings Wednesday morning.

It was unclear Tuesday whether the United Nations conducted its own forensic investigation or relied on work done by a consultant hired by Bezos or someone else. De Becker wrote last year that “our investigators and several experts concluded with high confidence that the Saudis had access to Bezos’ phone.”

The Saudi Embassy in Washington denied the report. “Recent media reports that suggest the Kingdom is behind a hacking of Mr. Jeff Bezos’ phone are absurd,” the embassy tweeted.

A Palestinian researcher who lives in Norway and focuses on the Saudi government’s use of online propaganda, Iyad el-Baghdadi, said on Twitter that the hacking of Bezos’s phone “came directly from MBS’s personal phone, a few days after [the prince and Bezos] exchanged numbers.” Baghdadi said he assisted de Becker and Bezos in their investigation of alleged Saudi attacks on the billionaire.

In addition, a new documentary film titled “The Dissident,” which premieres at the Sundance Film Festival on Friday, reports that the video file Mohammed sent to Bezos probably contained Pegasus, a hacking program that lets users surreptitiously extract past and future data from a phone after the target clicks on a link.

The film reports that the two men had been discussing a plan for Amazon to build data centers in Saudi Arabia.

Relations between Bezos and the Saudi government seemed to go from promising to poisoned over the past two years. After Trump picked Saudi Arabia for his first foreign trip as president, and Mohammed visited the United States in early 2018, Bezos’s company continued its efforts to make a $1 billion deal to build three data centers for Amazon Web Services in the desert kingdom – a project that seemed to dovetail with the prince’s desire to expand his country’s participation in the global economy.

Bezos and Mohammed exchanged phone numbers at a dinner in Los Angeles during the prince’s trip to the United States, according to The Financial Times.

Amazon Web Services, which dominates the cloud-computing industry, is the most profitable part of Bezos’s colossal business empire.

But a far smaller piece of Bezos’s business interests, The Post, proved to be what the billionaire later called “a complexifier” in his relationship with the Saudis. The Post’s editorial department, which runs the opinion side of the newsroom, gave Khashoggi, a Saudi dissident who had fled to the United States, a contract to write columns.

After Khashoggi was killed at the Saudi Consulate in Istanbul, a wave of anti-Bezos tweets originating in Saudi Arabia appeared, criticized Amazon and The Post. A Saudi court last month sentenced five people to death for the assassination, but Callamard says in the documentary that the sentencing has allowed the plot’s masterminds, whom she believes to include Mohammed and his senior advisers, to avoid censure.