Mahmoud Ahmadinejad, Iran's hard-line former president, who served from 2005 to 2013, has been barred from seeking re-election, Iranian state TV reported. Iran's Guardian Council, a clerical organization charged with vetting candidates, found Ahmadinejad ineligible. Iran's current president, Hassan Rouhani, will be allowed to run.
"I didn't tell him not to participate," Khamenei said, according to his official website. "I told him I won't recommend him participating."
As supreme leader, Khamenei has final say in all matters of state. Ahmadinejad is the highest-ranking Iranian official to publicly defy Khamenei, according to the Guardian.
Ahmadinejad previously served two four-year terms before being replaced by Rouhani, a moderate. After four years out of office, he was eligible to run again under Iranian election law.
In the wake of Donald Trump's travel ban barring immigration to the U.S. from seven Muslim-majority countries, one of which was Iran, Ahmadinejad penned a lengthy letter to the president, in which he criticized Trump and the U.S. electoral system, which he reportedly called "corrupt."
Correction: April 21, 2017
A previous version of this story misstated the name of Iran's supreme leader. That leader is Ayatollah Ali Khamenei.