China said Friday that it will "continue to play a constructive role to de-escalate" tensions in the Middle East after Iranian media reported explosions heard near the city of Isfahan and US media quoted officials saying Israel had carried out retaliatory strikes on its arch-rival.

"China opposes any actions that further escalate tensions and will continue to play a constructive role to de-escalate the situation," foreign ministry spokesperson Lin Jian said.

Air defence systems over several Iranian cities were activated on Friday, state media reported, after the country's official broadcaster said explosions were heard near Isfahan.

Israel had previously warned it would hit back after Iran fired hundreds of missiles and drones at Israel almost a week ago, in retaliation for a deadly strike -- which Tehran blamed on its foe -- that levelled Iran's consular annex at its embassy in Syria.

Fears of a major regional spillover from the Gaza war have since soared.

Beijing's embassy in Tehran on Friday warned its citizens and companies in Iran to "take precautions against security risks, pay close attention to the development of the situation and ensure their own safety".

"Currently, the security situation in the host country is changing rapidly," the embassy said in a social media statement.

China is a close partner of Iran, its largest trade partner, and a top buyer of its sanctioned oil.

The United States has repeatedly made public appeals for China to use its influence over Tehran to manage tensions in the region, which are currently turbocharged over the Israel-Hamas conflict.

Beijing's top diplomat Wang Yi held talks with his Iranian counterpart this week, with state media reporting that Tehran had said it was "willing to exercise restraint" after its first-ever attack on Israel's territory.

China, historically sympathetic to the Palestinian cause, has been calling for a ceasefire in Gaza since the war began when Hamas militants attacked Israel on October 7.