"A military attack by the Zionist regime will undoubtedly lead to the collapse of this regime," Vahidi was quoted as saying by Iran's state-run Press TV. He did not say what type of action Iran would take in such a scenario.
Some Israeli officials have said the Jewish state must act by the summer if it wants to effectively halt Iran's program because Tehran is moving more of its nuclear installations deep underground, where Israeli bombs can't reach them.
Iran has spread its nuclear facilities across the vast country and has built key portions underground to protect them from possible airstrikes.
The International Atomic Energy Agency said in a report Friday that Iran has ramped up production of higher-grade enriched uranium in recent months.
Israeli Prime Minister Benjamin Netanyahu said in a statement Saturday that the report "constitutes additional proof that Israel's assessments are correct" and that Tehran's nuclear program is moving ahead unhindered.
Israel views Iran as an existential threat, citing frequent calls by President Mahmoud Ahmadinejad for Israel's destruction, Iran's support for violent anti-Israel militant groups and its long range missile program.
Israel has shown in the past that it is willing to take unilateral action if it feels justified. In 1981, the Israeli air force destroyed an unfinished Iraqi nuclear reactor. And in 2007, Israeli warplanes are believed to have destroyed a target that foreign experts think was an unfinished nuclear reactor in Syria.
Iran has warned in the past that Tehran would respond to an attack against it by pounding Israel with missiles. It could also use its proxies, Hezbollah and Hamas, to launch rockets at the Jewish state, and cause global oil prices to spike by striking targets in the Gulf.
Iran's arsenal already boasts missiles with a range of about 1,250 miles (2,000 kilometers) that were specifically designed for Israel and U.S. targets in the Gulf. The two missiles in Iran's possession that have such a range are the Shahab-3 and the Sajjil.
Iran's military leaders say the Tehran possesses the technology to manufacture missiles with a range greater than 1,250 miles, but they say they don't feel the need to do so.
The Revolutionary Guard, which is Iran's most powerful military force and in charge of the country's missile program, unveiled underground smart missile silos last year, claiming that medium- and long-range missiles stored in them are ready to launch if Iran is attacked.
The silos are widely viewed as a strategic asset for Iran in the event of a U.S. or Israeli strike on its nuclear facilities because it greatly reduces the time for Iran to respond to strikes.