I was not monitoring situation in Iran back when he was the president but from what I recall Mahmoud Ahmadinejad was the progressive one that wanted to reintegrate Iran into the world. He is not the hardline crazy guy that you'd associate with Iranian leadership.
Pretty much, he was the sane one out of them all.