Thousands of mourners gathered Sunday in the center of Iran's capital, while some celebrated elsewhere after the death of Iran's supreme leader, Ayatollah Ali Khamenei.

The mourners, dressed mostly in black and some crying, chanted "death to America" and "death to Israel" in Enqelab (Revolution) Square, with many waving Iran's flags and holding photos of Khamenei.

Iranian state television announced a 40-day mourning period and seven public holidays.

"With the martyrdom of the supreme leader, his path and mission neither will be lost nor will be forgotten; on the other hand, they will be pursued with greater vigour and zeal," a presenter said.

Iran's President Masoud Pezeshkian on Sunday branded Khamenei's killing a "declaration of war against Muslims" by Israel and the United States.