A number of cooperation documents were signed by Russia and Saudi Arabia on Thursday, after President Putin met with Saudi Prince Mohammed in what was one of the most anticipated meetings at the international economic forum in St. Petersburg.

The pair has signed six agreements in total, Al Arabiya News Channel reported. A cooperation agreement on a peaceful nuclear program was among the documents, the press service of Russia’s nuclear agency, Rosatom, said.

According to Rosatom, the document is the first in the history of Russia-Saudi relations to create a legal framework for cooperation between the nations in the field of nuclear energy. Future joint projects might include construction of nuclear power reactors, provision of services in nuclear fuel cycling, including those for nuclear power stations and research reactor facilities.

READ MORE: Share of ‘high-end oil’ to jump to 56% by 2040 – Russian Energy Minister to RT

The Gulf kingdom has no industrial nuclear power plants, but has big plans for developing nuclear energy.

The two oil heavyweights have also agreed on the creation of a working group to develop joint energy projects, Russian Energy Minister Aleksandr Novak said on Thursday. Saudi Arabia is interested in energy projects in Russia, the minister said, adding that Russia doesn’t aim to replace existing partners in oil and gas cooperation, but rather wants to establish new ones.

READ MORE: Saudi Arabia & Russia agree working group for joint energy projects – energy minister

The countries are ready to cooperate in a number of other spheres, the minister told journalists, mentioning pharmaceuticals and infrastructure development as prospective sectors.

“Our colleagues from Saudi Arabia have brought a lot of projects to the table. These projects will be introduced to our companies, including the ones involving the construction and upgrade of railways and building underground railway systems,” Novak said, adding that the Gulf kingdom plans to build metro systems in four cities in the near future.

Russia’s state space agency, Roscosmos, and Saudi national center for science and technology KACST signed papers including agendas for future cooperation in space exploration.

On meeting Putin, the 30-year old deputy crown prince Mohammed bin Salman, who is Saudi Arabia’s Defense Minister, announced that his father, King Salman, was inviting the Russian leader to visit the Gulf state.

“I have the honor to pass on an invitation to visit the kingdom of Saudi Arabia, as we regard Russia as one of the important states in the contemporary world, and our relations have roots in the past,” Prince Mohammed said, adding that Russia had been the first country to officially recognize the Gulf kingdom. “We will aim to develop bilateral relations in all sectors,” he added.

Putin said he accepted the invite, and also invited the king to pay a visit to Russia - an invitation that has also been accepted.

READ MORE: Saudi Arabia rejects all-inclusive arms embargo on Yemen proposed by Russia

Thursday’s meetings were quite a success for the two nations, which - when it comes to diplomacy - are at opposite ends of the spectrum on a wide swathe of issues, most notably the civil war in Syria. Moscow is also a long-time supporter of Iran, which Riyadh sees as a rival.

READ MORE: West, Arab states only pay ‘lip service’ to Yemen humanitarian aid – Churkin

Russia has also been critical of the Saudi-led bombing campaign in Yemen. Prior to the meetings in St. Petersburg, the Saudi ambassador to Russia, Abdulrahman Al-Rassi, said Moscow has an “important” role to play in implementing a Security Council resolution on Yemen, according to the Saudi Press Agency (SPA), reporting on Thursday.

The ambassador said Moscow’s role was also “important” when it comes to other countries in his region, such as Iran, stressing that Russia should use its power in the Security Council to “maintain stability and security in the world.”