Torture. Assassination of political dissidents. Financing terrorism. Civilian airstrikes. Oppression of women and religious minorities. Saudi Arabia’s record on human rights ranks among the world’s worst. Yet the US has counted the country among its allies for a steady supply of oil, willingness to contain Iran’s ambitions, and fighting the Islamic State.

After the apparent killing (paywall) and gruesome dismemberment of critic and Washington Post columnist Jamal Khashoggi at a Saudi Consulate in Turkey this month, allies in the US may be falling away.

The US has a cozy relationship with the country. Saudi Arabia was the first foreign country Donald Trump visited as president, and his son-in-law Jared Kushner has a chummy relationship with Crown Prince Mohammed bin Salman, the leader of the country’s absolute monarchy since 2017. Trump has stood by the monarch without criticism since entering the White House. Last year, Trump said in a speech before Arab leaders in the Saudi capital of Riyadh that he was not interested in pressuring them on human rights. This week, Trump simply repeated bin Salman’s account of the alleged murder. “Just spoke with the Crown Prince of Saudi Arabia who totally denied any knowledge of what took place in their Turkish Consulate,” Trump tweeted on Oct. 16. “He was with Secretary of State Mike Pompeo during the call, and told me that he has already started, and will rapidly expand, a full and complete investigation into this matter. Answers will be forthcoming shortly.”

But even reliable allies are now turning against the country.

Republican senator Lindsey Graham said this week he can no longer do business with Saudi Arabia as long as bin Salman remains in charge. The boycott of the country has spread to business leaders, especially in Silicon Valley. Uber CEO Dara Khosrowshahi and other prominent figures including executives at Ford, Google, and JPMorgan Chase (paywall) have pulled out of the country’s annual “Davos in the Desert” event this month.

Will this extend to entrepreneurs taking Saudi money? It won’t be easy. The kingdom’s influence is spreading each year. Saudi money is already behind many of the biggest tech startups in the US, including Lyft, Uber and Magic Leap. Saudi Arabia’s massive $45 billion check to SoftBank’s Vision Fund, the largest venture fund of all time, means Saudi money will likely be part of the biggest pool of venture money for years to come. The Vision Fund has made at least 26 investments including into Slack, WeWork, GM Cruise, and other brand names.

Quartz collected data from private equity research firms Quid and PitchBook to show how Saudi Arabia has managed to become one of Silicon Valley’s biggest backers through direct investments and backing venture funds.

How much have Saudis invested in Silicon Valley?

Billions of dollars. Over the last five years, Quid estimates Saudi investors have directly participated in investment rounds totaling at least $6.2 billion. Since the exact composition of each round is not public, it’s not possible to say how much of this money came directly from the Saudis compared to other investors participating in the rounds. But the Saudis are among the world’s biggest check writers.

As the kingdom diversified its wealth away from dwindling oil reserves, financial vehicles have funneled petrodollars into Western companies. After signing just one such deal in 2009, at least a dozen investments per year have been recorded by Quid since 2012.

These direct investments come on top of Saudi Arabia’s role as one of the world’s biggest limited partners backing investment funds. Two $45 billion investments in SoftBank’s venture funds in the last three years have instantly made it among the world’s biggest financial players in the venture world.

Who’s doing the investing?

Saudi Arabia’s money is in multiple funds with global ambitions. One of the biggest is the Saudi Public Investment Fund, which said it plans to grow from around $100 billion today to $2 trillion by 2030. Among the public funds investing in US companies, the top ones tracked by private equity research firms are listed below.

This doesn’t encompass the massive pools of money others in Saudi’s royal family are investing in companies through personal channels. The primary Saudi investors in US companies from 2008-2017 according to Quid and Pitchbook are:

# of US investments # of tech investments Saudi ARAMCO Energy Ventures 16 4 Saudi Public Investment Fund 6 4 Riyadh Valley Company* 2 1 The Kingdom Holding Company 1 1 Vision Venture Capital* 1 1 Saad AlSogair* 1 n/a

(funds with * only include investment tallies between 2017-2018)

What are they investing their money in?

Since 2008, Quid shows the Saudis moving away from industrial sectors such as chemicals and materials in favor of technology like augmented reality and ride-share platforms such as Lyft and Uber. The country’s state oil firm, ARAMCO, led the push into industrials, but more recent funds such as the Saudi Public Investment Fund is focused on technology.

Many of the investments have been into big-name operations. Even Tesla was in discussions, ultimately abandoned, with Saudi Arabia’s sovereign wealth fund for a massive $80 billion or so deal to take Tesla private. The biggest deals of the last two years have been investment rounds backing Silicon Valley startups. The top investment rounds with Saudi participation are listed below.

Company sector investment round (millions; USD) Saudi investor Uber rideshare platform $11,321 Public Investment Fund Lyft rideshare platform $4,915 Kingdom Holding Magic Leap augmented reality $1,888 Public Investment Fund Lucid Motors car manufacturer $1,131 Public Investment Fund Virgin Galactic* aerospace $280 Public Investment Fund Desktop Metal industrial manufacturing $273 Saudi Aramco Energy Ventures Beamreach Solar energy $239 Riyadh Valley Company Snap social media network $250 Prince Alwaleed Bin Talal of Saudi Arabia Siluria Technologies oil and gas $151 Saudi Aramco Energy Ventures, Digital Signal facial recognition technology $125 Technology Control Corporation Rive Technology oil and gas $85 Saudi Aramco Energy Ventures

*Richard Branson has “temporarily suspended” its partnership with Saudi Arabia, putting the $1 billion investment in question.