Incidentally, the diplomatic relations between the two countries were re-installed in 1991, but the indications of real reapproachment appeared in 2000s after peace in Chechnya. Since then both parties declared that they wanted to raise cooperation to another level but the process did not go any further.
Threes already one positive change in one direction, due to the efforts of Moscow and Riyadh a Global Pact of Oil Production Reducing appeared. Here our interests logically converged. It's not surprising that based on the negotiations in Moscow, the parties declared their readiness, “if necessary”, to prolong the agreement under the Pact.
A number of agreements in the economic sphere was also signed, related to Corporation in the sphere of nuclear energy, high-tech, oil refining, transports, finance, namely, between the Russian Foundation of Direct Investments and the Saudi Arabia Sovereign Foundation. But we should not forget that in the East the fact of signing agreements means only a memorandum of understanding, but not a binding obligation.
The contracts, memorandums, preliminary agreements of cooperation in the military sphere caused much noise, this was about supply of anti-tank systems, grenade launchers, building a plant in Saudi Arabia for Small Arms production, totaling 3.5 billion dollars. The main news was about the notable rocket systems С-400 Triumph. Director of Rostech Sergei Chemezov said: “The Saudis set us a condition that the agreement will become effective if we transfer them a part of technologies and open production in the territory of the Kingdom.” Will Russia do that is a big question. Besides, as Chemezov said, “5 years ago we signed contracts for 20 billion dollars, but there's no use, as it didn't go any further than only intentions. Riyadh did not purchase anything for a ruble’s cost. Putting it differently, the Saudis were simply playing with us saying don't sell your C-300 air defense systems to Iraq, and we will buy your weapons and other stuff.” (https://lenta.ru/news/2017/07/10/saudi/)
So far we can't say for sure, that the game is over. The Saudi army is perfectly armed with latest American, British and French weapons. There is no sense in rearming it, it is the more so as they signed a record contract for weapons supplies for over 100 billion dollars. They don't have any reasons to spite it for the West as Turkey does, the relations between Riyadh, on one side, and Washington and Brussels, on the other, are not easy (this hardly ever exists at all), but quite partnership-like.
Probably, the matter is about a different thing. Unfortunately, the Middle East experiences another stage of inter-religious opposition of Sunnis and Shiites personified by the Saudi Arabia and Iran, respectively. Right now the initiative is on Iran's field that promotes its influence in Syria, Iraq, Yemen, Lebanon (through Hezbollah) and even in the region of the Persian Gulf, in Qatar that the neighbors don't like. Incidentally, not far from Qatar is Bahrain full of Shiites, besides the Kingdom itself is also populated with many Shiites.
Considering the amount of criticism against Tehran that was publicly voiced by the Saudi king in Moscow, we don't even doubt that the Iranian subject was one of the main in the foreign policy part on the negotiations agenda. The issue is crucial now, now the pro-Saudis groups, under pressure of Syrian, Iranian and Russian military, as well as those controlled by Tehran and Ankara, are giving up positions at an increasing speed, thus making the position of the Kingdom in the region to fall. Thus, it is quite probable that the Riyadh’s position has a message in it: “Let us buy your weapons, just don't sell it to Iran.” The incumbent dynasty, despite certain economic difficulties of the recent time, can really afford to invest several billion dollars in “hardware” just not to let it go to the contender. Besides money, there are also political dividends which means new possible contracts with the other states of this region. The Saudi media underlined that in case Riyadh improved its relations with Moscow, this will tell on Moscow's relations with the other countries of the region.
It's also understandable that any agreements on Syria without approval of the Persian Gulf monarchies (read Saudi Arabia) are hard to implement and are fraught with new conflicts. The mere fact that the custodian of the two holy mosques went to Moscow is very important. It means that our country is accepted as an important player in the Middle East even by Riyadh and opens a new window of opportunities to Moscow as it is now used to say. Why shouldn't Russia try to become an intermediary in the conflict between Saudi Arabia and Iran? This mission will not be humiliating for anyone, as the East respects negotiators, and the possible success would be a great gift.
The fact that Russia can act in this function was proven by Faisal Abbas declaration (the editor-in-chief of the Saudi newspaper Arab News): “We cannot ignore that Russia became a key player in the Middle East, partially because of the Obama Doctrine that caused US role to start diminishing in the region, while Russia, with its financial and military power, became part of this equation.”