The conservative-dominated Guardians Council yesterday eliminated both Esfandiar Rahim Mashaie and Rafsanjani from a list of eight candidates for the June 14 poll, and those ruled out have no right to appeal.
"I consider... Mashaie as faithful, righteous and useful for the country, and had endorsed him based on these capabilities and characteristics," Ahmadinejad said, quoted by his website.
"But he has been a victim of injustice," added the incumbent, who under Iran's constitution cannot stand for re-election after serving two consecutive terms.
"Mr Hashemi has always been among the pillars of the regime and will remain so, God willing," he added.
More From This Section
Only eight candidates won approval to stand -- five conservatives close to supreme leader Ayatollah Ali Khamenei, the ultimate decision-maker in the Islamic republic, as well as two moderates and a reformist.
The council gave no explanation for the disqualifications.
Mahaie said yesterday that he would seek to reverse his disqualification.
"I deem my disqualification an injustice. I will seek its resolution through" Khamenei, he told the Fars news agency. "God willing, it will be resolved.