* First trip in 12 years comes amid heightened regional tensions
* Moscow gained strength by sending troops to Syria in 2015
* Putin maintains close relations with Iran and Gulf Arab rivals
* Big investments, cooperation on energy policy key to Saudi ties (Adds comments by Putin, King Salman)
By Olesya Astakhova and Stephen Kalin
RIYADH, Oct 14 (Reuters) - President Vladimir Putin signalled Moscow's growing Middle East clout on Monday on his first visit to Saudi Arabia in over a decade, buoyed by Russian military gains in Syria, strong ties with Riyadh's regional rivals and energy cooperation.
Moscow accrued power in the Middle East in 2015 by sending troops to Syria, where it and Iran have been key backers of President Bashar al-Assad amid civil war, while the United States pulled back. Saudi Arabia sided with Syrian rebels.
On the eve of Putin's trip, U.S. troops abruptly retreated from northern Syria as Russian-backed government forces deployed deep inside Kurdish-held territory under a deal to help fend off a Turkish cross-border offensive.
Russia has also strengthened ties with both Sunni Muslim Saudi Arabia and Shi'ite Iran, which are locked in a decades-old contest for influence that veered towards open conflict after a recent spate of attacks on oil assets in the Gulf that Riyadh and Washington blame on Tehran. Iran denies the charges.
Tensions with Iran, which is locked in several proxy wars with Saudi Arabia, have risen to new highs after Washington last year quit a 2015 international nuclear accord with Tehran and re-imposed sanctions.
The Russian president met King Salman and de facto ruler Crown Prince Mohammed bin Salman, with whom Putin says he has friendly relations.
In televised remarks, Putin and the king said bilateral relations were important to regional security and stability.
After discussions that touched on joint investments as well as conflicts in Syria and Yemen, Prince Mohammed said Saudi-Russian cooperation on energy would achieve stability.
Deepening ties have seen non-OPEC Russia, once regarded as a rival in oil markets, join OPEC kingpin Saudi Arabia in forming an alliance known as OPEC+ to support crude prices by restraining output.
At a morning forum convening 300 Saudi and Russian CEOs, Saudi Energy Minister Prince Abdulaziz bin Salman said producers were showing high commitments to the deal, and his Russian counterpart said there were no talks underway to change it.
Ahead of the visit, Putin, who offered to provide Russian defence systems to the kingdom after Sept. 14 attacks on its oil facilities, said he could also play a positive role in easing tensions with Tehran given good ties with both sides.
Any progress on long-mulled Saudi plans to purchase the Russian S-400 surface-to-air missile systems would cause disquiet in Washington, which is sending 3,000 troops and additional air defence systems to Saudi Arabia.
U.S. President Donald Trump has resisted pressure to sanction Riyadh over human rights abuses, including the murder of journalist Jamal Khashoggi, calling that a "foolish" move that would only benefit competitors Russia and China.
Asked about concerns Riyadh was cozying up to Moscow, senior foreign ministry official Adel al-Jubeir said he saw no contradiction.
"We don’t believe that having close ties with Russia has any negative impact on our relationship with the United States," he told reporters on Sunday. "We believe that we can have strategic and strong ties with the United States while we develop our ties with Russia."
Russian and Saudi flags lined Riyadh streets ahead of Putin's one-day visit, which includes an evening performance by Russia's Tchaikovsky Symphony Orchestra. He travels to the United Arab Emirates on Tuesday.
The two sides signed more than a dozen memoranda of understanding during the visit including in the fields of energy, petrochemicals, transport and artificial intelligence.
RDIF head Kirill Dmitriev said a number of Russian investors were interested in a planned initial public offering of Aramco. The oil major could sell 1-2% through a local listing its chairman said would be announced "very, very soon", ahead of a potential international offering.
Energy Minister Alexander Novak said Russia's Gazprom was interested in cooperating with Saudi firms on natural gas.
Moscow, the world’s largest wheat exporter, made some progress in accessing the Saudi and Middle Eastern markets when the kingdom agreed in August to relax specifications for wheat imports, opening the door to Black Sea imports.
RDIF and Saudi Arabia's SALIC signed an agreement to jointly search for investment projects in Russia's agricultural sector. (Additional reporting by Maher Chmaytelli and Dahlia Nehme in Dubai and Polina Devitt in Moscow; Writing by Stephen Kalin; Editing by Lincoln Feast, William Maclean)