Iran is clearly convinced that there is nothing it can do to prevent a US attack. Therefore it is trying to maximize it's support in the Islamic world. Standing up to colonialist powers like Blair's England and Bushiz America is one certain way to gain admiration and sympathy.
Israeli PM to Palestinian President Abbas: We must fight terror together (Haaretz)
from the article: Iran challenges Bush