Close allies of former President Mahmoud Ahmadinejad say Iran's supreme leader has recommended he not run in next May's presidential election because he is a polarizing figure among hard-liners.

Mohammad Reza Mirtajeddini, Ahmadinejad's vice president from 2009 to 2013, and former hard-line parliamentarian Gholamreza Mesbahi Moghadam confirmed the news to the website Khabar Online on Monday.

Moghadam said Supreme Leader Ayatollah Ali Khamenei's advice amounted to a "serious state objection" to Ahmadinejad's potential candidacy, and that the former president would follow his advice.

Khamenei had earlier said he recommended that a potential candidate not run, in order to prevent division in the country, without naming him.

Ahmadinejad, whose disputed 2009 re-election sparked widespread protests and violence, remains a controversial figure in Iran, even among fellow hard-liners.