Chinese President Xi Jinping and Iranian President Hassan Rouhani at a meeting at Saadabad Palace in Tehran, Iran on January 23, 2016.

China will host Iranian President Hassan Rouhani next month at a regional summit in a Chinese coastal city, the country's foreign ministry said on Monday, as major power scramble to save Iran's nuclear deal after the United States pulled out.

Rouhani will pay a working visit to China and attend the summit of the China and Russia-led security bloc the Shanghai Cooperation Organisation, the ministry said.

It did not give exact dates for his visit, but the summit is scheduled to be held on the second weekend of June in the northern Chinese city of Qingdao.

Iran is currently an observer member of the Shanghai Cooperation Organisation, though it has long sought full membership.

Russia has previously argued that with Western sanctions against Tehran lifted, it could finally become a member of the bloc which also includes four ex-Soviet Central Asian republics, Pakistan and India.

The 2015 agreement between Iran and world powers lifted international sanctions on Tehran. In return, Iran agreed to restrictions on its nuclear activities, increasing the time it would need to produce an atom bomb if it chose to do so.

Since U.S. President Donald Trump withdrew the United States this 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.

China has also strongly supported the deal and is one of its signatories.