"If they (U.S. and Israel) militarily attack Iran ... They should be afraid of the day when our missiles with 2,000 km range will hit Tel Aviv," Ahmad Khatami told state television.
Khatami sits on the Assembly of Experts, the body of 86 clerics that constitutionally supervises the country's most powerful man, Supreme Leader Ayatollah Ali Khamenei.
Arms experts say Iran's Shahab-3 missiles have a maximum range of around 2,000 km (1,240 miles), meaning they are capable of hitting Israel as well as U.S. military bases in the Gulf.
U.S. officials accuse Iran of planning to equip its missiles with nuclear warheads. Iran says it has no desire to have atomic weapons and is only developing nuclear technology for peaceful purposes, such as electricity generation.
Iranian military commanders have repeatedly warned they would not hesitate to deploy the Shahab-3 missiles if Iran came under attack over its disputed nuclear programme.
Washington says it wants a diplomatic solution to Iran's nuclear dispute with the West, but has not ruled out military options.
Tehran has vowed to expand its atomic fuel activities despite a U.N. Security Council resolution demanding it halt nuclear work by Aug. 31 or face the threat of sanctions.
Khatami praised Lebanon's Hizbollah for its resistance against Israel, saying that U.S. President George W. Bush and Israel's Prime Minister Ehud Olmert should have learned lessons from the month-long war in Lebanon.
"I congratulate Hizbollah for its victory, which was the victory of Islam. This was a disgraceful defeat for America and the Zionist regime (Israel)," Khatami said.
Bush on Monday reiterated that Iran should stop supporting armed groups in both Iraq and Lebanon.
Iran, which refuses to recognise Israel, says it only gives moral support to anti-Israeli groups like Hamas and Hizbollah and denies backing insurgents in neighbouring Iraq.