At the same time , the defiance of the West by President Mahmoud Ahmadinejad of Iran has unsettled markets , and American officials have said the climate of anxiety over the prospect of globally enforced sanctions -- or even military action -- was having its own effect . ''