Even sharing photos or videos that could aid enemy targeting may be treated as intelligence cooperation, the spokesman added.
Iranian media have reported more than 1,000 arrests over the course of the month, related to individuals accused of filming sensitive locations, sharing anti-government content online, or "cooperating with the enemy".
The U.S. and Israel attacked Iran on February 28, since when the conflict has spread across the region, killing thousands, disrupting energy supplies and hitting the global economy.
The judiciary spokesman said the legislation, passed last year, applies to operational, intelligence and certain media activities deemed to support hostile governments, notably the United States and Israel.
He warned those creating “fear” through misinformation could face prison terms, with penalties increased in wartime.
He added that authorities have issued around 200 indictments in such cases and were working with security bodies to identify and seize assets linked to suspects, stressing that there would be no leniency in enforcing the law.
(Reporting by Dubai Newsroom; Editing by Alex Richardson)

An Iranian flag adorns a statue displaying tributes and portraits of Iranian school girls, killed in the Minab school strike, at the Vanak square, in Tehran, Iran, 30 March 2026. On 28 February 2026, a missile strike targeted an all-girls elementary school in Minab, southern Iran, claiming the lives of over 100 schoolchildren, according to Iranian state media. A joint US and Israeli military operation, launched on 28 February, continues to target strategic sites across Iran. EPA/ABEDIN TAHERKENAREH