Kim Philby achieved undying infamy as the senior British intelligence officer who, for decades through the cold war, fed British and American secrets to the Soviet Union before finally defecting to live out his days as a KGB colonel in Moscow.

Less well known, but with a greater impact on history, was his father, Harry St John Bridger Philby, or Abdullah Philby, as he was known after his conversion to Islam.

Like his son after him, Philby the father was also a spy. During the first world war, he was tasked, alongside his colleague TE Lawrence, with stirring up a tribal revolt in Arabia against the Ottoman Empire.

After the war, he was given responsibility for suppressing Arab opposition to the British presence in the region. But like his son, Philby also jumped the fence, converting to Islam and becoming a senior adviser to the newly crowned Arabian king, Ibn Saud, who would go on to give his name to his country.

In the early years of his reign, Ibn Saud had been happy to rule as a client of the British. But in 1936, Philby persuaded the king to switch his allegiance away from the British and to the rising power of the United States, a feat he achieved by offering Saudi’s exclusive oil concession to the US oil companies Texaco and Chevron (or SoCal as it was then called) rather than to the established British giant BP.

That is why Saudi Arabia’s monopoly state oil company is today called Aramco – the Arab-American oil company – rather than Arbroco. In effect, Saudi has remained a client state of the US ever since, closely allied to Washington and heavily reliant on US military backing.

WHY US$50 OIL IS AT THE HEART OF THE SAUDI-QATAR CONFLICT

Now, however, 80 years after Abdullah Philby engineered his switch, Saudi could be about to change allegiance once again. Signs are beginning to emerge that the current king, Salman, son of Ibn Saud, may transfer his country’s primary strategic alliance away from the US and towards the rising power of China.

For the time being Saudi remains closely bound to US. In May, Donald Trump chose Riyadh as the destination of his first foreign visit as US president. And while there he signed a US$110 billion deal to sell Saudi advanced weaponry, including warships, battle tanks and attack helicopters.

Nevertheless, ties between Riyadh and Washington have frayed in recent years. The relationship was especially difficult under the presidency of Barack Obama, with his talk of human rights and attempts to build bridges with Saudi’s regional rival Iran.

More to the point, those frictions arose against a backdrop of growing American energy security and a corresponding fall in US oil imports from the Middle East. As the US has ramped up its production of domestic shale oil over the last 10 years, its imports of crude oil have fallen from almost 14 million barrels a day in 2007 to just 8 million in the first half of this year.

WHY SAUDI-UAE CAMPAIGN AGAINST QATAR AND IRAN PUTS CHINA IN A BIND

Over the same period, China’s oil demand has more than doubled. As a result, earlier this year China surpassed the US as the world’s largest crude importer, buying more than 9 million barrels a day. By far China’s biggest suppliers were Russia and Saudi. As China’s demand continues to grow, its dependence on Saudi oil shipments is only going to increase.

That means Beijing now has a bigger stake than Washington in Saudi’s future stability and security. As a result, both Beijing and Riyadh are working on strengthening their bilateral relationship. King Salman visited China in March, signing trade and investment deals worth US$60 billion. And last month, Chinese vice-premier Zhang Gaoli made a return trip, signing a further round of deals, including one to set up a joint US$20 billion fund to invest in new projects in both countries.

Beijing has long wanted to persuade Saudi to accept payment for its oil shipments in yuan rather than US dollars. Soon it may succeed, as the yuan slowly gains wider acceptance as an international currency. Last week, Riyadh’s vice-minister of the economy said Saudi was considering funding part of its giant fiscal deficit with yuan-denominated debt – a major departure for a country that pegs its currency to the US dollar. It’s still early days, but Saudi’s drift from the US and towards China could accelerate rapidly over the coming year. In 2018, Riyadh plans to float its state oil company Saudi Aramco on the international capital markets in what it hopes will be by far the biggest equity offering ever, doubling or even quadrupling Chinese internet retail giant Alibaba’s record US$25 billion offering in 2014.

However, drumming up buying interest from Western institutional investors may prove difficult given the Saudi government’s aggressive target valuation and the possible exclusion of the stock from major benchmark indexes.

THE US-SAUDI PLOT FOR IRAN THAT SPELLS TROUBLE FOR CHINA’S NEW SILK ROAD

In that case, the offering’s success will hinge heavily on Saudi’s ability to enlist major cornerstone investors. And the most probable cornerstones with the deepest pockets will be Chinese state actors like sovereign wealth funds China Investment Corporation and SAFE Investment Company, and oil major PetroChina.

Buying a sizeable stake in Aramco would allow China to lock in a large part of its future oil import needs. And it would greatly increase Beijing’s leverage in persuading Saudi to accept oil payments in yuan rather than US dollars. Naturally those petro-yuan would tend to flow back to China in the form of inward investments, and perhaps as payment for future purchases of Chinese arms. In time it could even make sense for Saudi to repeg its currency from the US dollar to the yuan.

In a stroke, China would have displaced the US as the closest strategic and economic partner of the world’s largest, and lowest cost, oil producer, fundamentally reshaping global geopolitics.

That would suit Beijing. It might also suit Riyadh. China has little choice but to go on buying Saudi oil. In contrast, America has other options, which makes many in Washington question the importance of US relations with the Saudi regime.

For Riyadh, there are many ways in which China would be more convenient than the US as primary patron and protector. After all, Beijing would be far less likely to kick up a fuss about Saudi’s poor human rights record, its fondness for public executions, the oppression of its Shia minority, and its prosecution of nasty local wars like the one in Yemen.

It’s a potent argument. Back in 1936, Ibn Saud proved ready to switch his allegiance from a declining to a rising power when persuaded by Abdullah Philby that it would be in his best interest.

Some 80 years later his son may prove equally prepared to use Saudi’s oil wealth as the incentive to sign up a new great power patron – this time China.

Tom Holland is a former SCMP staffer, who has been writing about Asian affairs for more than 20 years