In a statement, Chinese President Xi Jinping said that "China supports Iran in safeguarding national sovereignty" and "resisting unilateralism and bullying," a comment aimed at criticising Washington's domination of global affairs.
Surrounded by a cohort of ministers, the two leaders renewed their vows of friendship and expressed their intention to further deepen economic and trade ties between their respective countries.
Both want to continue along the path initiated last September at the Samarkand summit, where Tehran submitted its application to join the Shanghai Cooperation Organisation, to which countries such as China, Russia, Pakistan and India belong.
Xi and Raisi attended the signing of 20 cooperation agreements including trade and tourism, the Chinese government announced.
These add to a 25-year strategy agreement signed in 2021 to cooperate in developing oil, industry and other fields. China is one of the biggest buyers of Iranian oil.
Both China and Iran are also linked by their relations with Russia, although in a very different way. While Tehran supplies weapons and drones to the Russian Army, Beijing defends Ukraine's sovereignty, although it claims to understand the reasons that pushed Moscow to invade that country.
There is no indication in the official Chinese account of the meeting, however, as to whether Xi and Raisi discussed Russia's attack on Ukraine.
The leaders meet in a context of growing international tension and deteriorating relations with Western countries; Iran has received global criticism for its crackdown on protesters following the death of Mahsa Amini in September, a young woman who had been arrested for not wearing her headscarf properly.
US officials condemned China this week after a large balloon was spotted flying over Montana, part of what National Security Council spokesperson John Kirby called "a high-altitude balloon programme for intelligence collection connected to the People's Liberation Army," - a claim China has denied.