As a leader of major country with global influence, President Putin is "an old friend" and "a good friend" of the Chinese people, Xi said.
Russian Federation was expelled from the grouping in 2014 after it invaded and annexed Crimea and for its support for pro-Russia separatists in Ukraine.
Speaking at the start of his meeting with Putin on the sidelines of the summit, Rouhani hailed close Iran-Russia ties.
The two leaders agreed that China and Russian Federation should adhere to the concept of everlasting friendship and the spirit of strategic coordination, and expand and deepen cooperation in all areas.
Its member states also include four former Soviet Central Asian republics, Pakistan and India. The agreement, put into place in 2015 under President Barack Obama, lifted global economic sanctions against Iran in exchange for the country to limit its nuclear program.
It is disappointing that the United States unilaterally withdrew from the Iran nuclear deal, said the statement, adding that China and Russian Federation will try their best to safeguard the deal and take note of the extreme importance of protecting the interests of all parties who engage in economic and trade cooperation with Iran from unilateral imposition of long-arm jurisdiction.
Putin emphasized the significance of the SCO, which includes Russian Federation and China, and said the combined purchasing power of the SCO was bigger than G7. "Russia should be in this meeting", Trump told reporters before leaving the White House South Lawn for Canada, where the summit is being held.
Manchester United agree deal to sign Brazil midfielder Fred
The 25-year old can be used in a three-man midfield along with Pogba and Matic. So it remains to be seen how Fred will cope in the Premier League.
On the prospect of a third World War, Putin said that the threat of mutual destruction has always restrained participants of the worldwide arena and prevented leading military powers from making hasty moves.
Putin echoed the Iranian leader in saying that their joint regional alliance will go on, particularly in Syria, Fars reported.
Putin added that Russian Federation is ready "to boost, deepen and improve relations with the U.S".
He adds Moscow will continue to honor its obligations under the Iranian nuclear deal.
Meanwhile, in Canada, a growing rift between the United States and its most important allies was on full display.
Xi, whose government is locked in tough negotiations with the United States to avoid a trade war, said World Trade Organisation rules and the multilateral trading system should be upheld to build an open world economy.
Since U.S. President Donald Trump withdrew the United States last month, calling the agreement deeply flawed, European states have been scrambling to ensure Iran gets enough economic benefits to persuade it to stay in the deal.