Raisi was declared dead on Monday after rescue teams found his crashed helicopter in a fog-shrouded western mountain region.
Xi sent “sincere condolences” to the Iran’s first vice president, foreign ministry spokesman Wang Wenbin said at a press briefing.
“(Raisi’s) tragic death is a great loss to the Iranian people, and the Chinese people have lost a good friend,” Wang quoted Xi as saying.
China is a close partner of Iran, its largest trade partner, and a top buyer of its sanctioned oil.
According to Wang, Xi stated that “President Raisi has made important contributions to maintaining Iran’s security and stability, promoting national development and prosperity, and also made active efforts to consolidate and develop the China-Iran comprehensive strategic partnership”.
China would offer “all necessary support and assistance” and “continue to support the Iranian government and people in safeguarding their independence, stability and development”, he added.
Wang noted China had also expressed “deep sorrow” at the death of Iran’s Foreign Minister Hossein Amirabdollahian, who was also on the helicopter.
The Iranian flag was at half-mast outside its embassy in Beijing.
Iran and China have deepened trade ties in recent years, though Beijing’s efforts to pull Tehran into its flagship Belt and Road Initiative infrastructure project have been complicated by sanctions.