Sorry, I disagree with those who say that nuclear warfare could never happen in the Middle East.
Have you never heard of the "Masada complex"?
Basically, Israel has been able to defeat its enemies through superior conventional warfare in short but deadly bliltzkrieg style campaigns.
However, if it gets involved in a war which it cannot blitzkrieg its way to victory and ends up in some kind of attritional warfare situation it is bound to lose against the superior numbers of, for example, an Iranian enemy.
Israel could accept losing such a war if its territory is not threatened (as for example in Lebanon a couple of years ago), but if its territory was under threat and there was nothing Israel could do in conventional military terms to stop that threat, it knows that it is doomed. In such a case, because of what happened to the Jews in WW2, I believe they will not accept such a defeat but will decide "If we're going down, we're taking you with us" and start firing off nukes. Firstly, they would do a couple of nukes to places where they do not risk so much getting radioactive fallout themselves (eg Tehran) but if the enemy keep coming, I think they will go all out to take down the whole Middle East with them and, with 300 nukes, they are capable of taking out every major city. So actually, unless Iran is prepared to accept complete annihilation for itself and the whole region, it had better hope that Israel beats them in a conventional war. If they do go to war against Israel, it will just be a pretense, in my opinion, intended to discourage America from attacking Iran, rather than seriously trying to defeat Israel, because if it does defeat Israel, it knows the nukes will fly.
Of course, I am not a mind reader of the Iranian leadership, but that is the way I would look at it if I were them.