Saudi Arabia's decision to join the China-led Shanghai Cooperation Organisation (SCO) as a dialogue partner on Tuesday has been hailed as a significant development for Beijing's growing influence in the region.
The decision has been framed as motivated by economics, but the geopolitical implications of the deal are unmistakable.
In addition to Saudi Arabia retaining its pole position as the top oil exporter to China in 2022, Beijing also helped broker an important thawing of relations between Riyadh and Tehran in March.
The Saudi-Iran deal, which took many regional analysts by surprise, seemed to only underscore China's growing clout in the region and ability to shape and mediate between bitter rivals.
"Riyadh realises that choosing one relationship with one side at the expense of the other will have a heavy cost," said Najah Al-Otaibi, a Saudi policy analyst based in London.
"Saudi Arabia is keen to develop its relationship with China, its biggest commercial partner, while maintaining relations with its security partner, the United States," she told Middle East Eye.
The SCO is a political and security union of countries spanning much of Eurasia, including China, India and Russia, and designed as a counterweight to Western influence in Asia.
Iran applied for membership to the SCO in 2008 and is one of four observer states in the organisation. Last year, the security body approved Iran's application for accession, overcoming concerns about letting a country under UN and US sanctions into the group.
'With the emergence of China as a rising international power, Riyadh does not want China's relations in the region to be limited to... Iran'
- Najah al-Otaibi, Saudi policy analyst
China also signed a 25-year strategic partnership agreement with Iran last year in a bid to deepen and expand the two countries' bilateral relations.
"With the emergence of China as a rising international power, Riyadh does not want China's relations in the region to be limited to strategic relations only with Iran," said Al-Otaibi. "Saudi Arabia aims to strengthen the Gulf and Arab weight in the circle of China's relations with the region."
Following the agreement with Saudi Arabia, the Chinese foreign ministry spokesperson Mao Ning said: "We are ready to strengthen cooperation with the Saudi side within the framework of the SCO to make greater contributions to maintaining regional security and stability and promoting common development."
For its part, Riyadh is in the midst of an ambitious reform programme called Vision 2030, a central plank of Crown Prince Mohammed bin Salman's drive to modernise the kingdom.
"The relationship with China provides various economic opportunities that serve the directions of the Saudi Crown Prince Mohammed bin Salman, who seeks to diversify the kingdom's economy and attract large foreign investments in the fields of infrastructure, manufacturing and technology," Al-Otaibi explained.
The Chinese government is also believed to be looking to increasingly lay down the foundations of a post-American, and more broadly a post-Western, order in the region, a strategy widely seen as a shot across the bow at the US Carter Doctrine, which sees the Persian Gulf as its exclusive sphere of influence.
"For many years, Saudi Arabia's relationship with China has been deepening within the context of a more multi-polar environment," Giorgio Cafiero, CEO of Washington-based geopolitical risk consultancy Gulf State Analytics, said.
"It is difficult to exaggerate the importance of Beijing in Riyadh's foreign policy decision," he told MEE, adding however that Saudi Arabia is still years away from potentially becoming a fully fledged member of the SCO.
Cafiero added that while the SCO's power and influence shouldn't be overstated and isn't ready to replace the US's security role in the region, China is looking to project itself as a security arbitrator.
"There is no way in which one could compare the SCO to Nato. It's not a military alliance. Rather, it is a political economic union," said Cafiero.
'Saudi Arabia sees its relationship with China as extremely important to the kingdom's future'
- Giorgio Cafiero, Middle East analyst
As the US-China rivalry intensifies, the growing economic ties between the region and Beijing seem to be the factor that is lubricating the expanding relationship.
The US has largely watched as Saudi Arabia and other Gulf states have made a geo-economic pivot to the east.
Saudi and Gulf oil exporters increasingly export more of their oil to the east than they do to the west, according to Cafiero. "This is a reality of the world we live in, and it was understandable why Saudi Arabia saw it in its interest to take this step towards joining the SCO."
"Saudi Arabia sees its relationship with China as extremely important to the kingdom's future," added Cafiero.
Gulf countries and increasingly Saudi Arabia, unlike in the past, are choosing to diversify their relationships. The Saudis are not trying to burn their bridges with the West while moving closer to China, Cafiero pointed out.
"The Saudis are trying to have more of a non-aligned foreign policy in which they have good relations with Western countries as well as good relations with Eastern countries. In Riyadh, the thinking is that the zero sum mindset should not be embraced," added Cafiero.