WASHINGTON — When President Obama secretly authorized the Central Intelligence Agency to begin arming Syria’s embattled rebels in 2013, the spy agency knew it would have a willing partner to help pay for the covert operation. It was the same partner the C.I.A. has relied on for decades for money and discretion in far-off conflicts: the Kingdom of Saudi Arabia.

Since then, the C.I.A. and its Saudi counterpart have maintained an unusual arrangement for the rebel-training mission, which the Americans have code-named Timber Sycamore. Under the deal, current and former administration officials said, the Saudis contribute both weapons and large sums of money, and the C.I.A takes the lead in training the rebels on AK-47 assault rifles and tank-destroying missiles.

The support for the Syrian rebels is only the latest chapter in the decadeslong relationship between the spy services of Saudi Arabia and the United States, an alliance that has endured through the Iran-contra scandal, support for the mujahedeen against the Soviets in Afghanistan and proxy fights in Africa. Sometimes, as in Syria, the two countries have worked in concert. In others, Saudi Arabia has simply written checks underwriting American covert activities.

The joint arming and training program, which other Middle East nations contribute money to, continues as America’s relations with Saudi Arabia — and the kingdom’s place in the region — are in flux. The old ties of cheap oil and geopolitics that have long bound the countries together have loosened as America’s dependence on foreign oil declines and the Obama administration tiptoes toward a diplomatic rapprochement with Iran.