At the United Nations , the remarks by Mr. Chavez on Wednesday set off a firestorm that almost overshadowed the visit by Iran 's president , Mahmoud Ahmadinejad , whose country has been under intense global scrutiny for its nuclear ambitions .