Iran had agreed to a suspension of uranium enrichment before its presidential election last month , in which a conservative candidate , Mahmoud Ahmadinejad , defeated the more moderate candidate , Ali Akbar Hashemi Rafsanjani , who had been considered more likely to reach a nuclear agreement with the Europeans .