TEHRAN, Iran (CNN) -- Iran's moderate former president will not challenge President Mahmoud Ahmadinejad in the upcoming presidential election, the state-run Fars news agency said Monday.
Mohammad Khatami, in a photo from February, will not run for president of Iran, the state news agency says.
Mohammad Khatami said last month that he would run in June, ending weeks of speculation, the state-run IRNA news agency reported February 8.
But he now says he will instead support moderate candidate Mir Hossein Moussavi, Fars reported Monday.
Moussavi is a former prime minister. Before Khatami declared his candidacy last month, he had said either he or Moussavi would run as the reformist candidate to challenge Ahmadinejad, a hardliner.
Khatami said he will soon make an official statement regarding his withdrawal.
Analysts said when Khatami announced his candidacy that he had the best chance as a reformist candidate to unseat the current president.
Khatami overwhelmingly won the presidency in 1997, raising hopes that the reformist movement would bring religious and democratic freedoms to the Islamic republic. But the real power in Iran rests in the hands of the supreme leader, Ayatollah Ali Khamenei.
Khatami, who left office in 2005, was unable to make major changes because of opposition from hardline elements in Iran's clerical establishment.
In 2006, Khatami visited the United States, becoming the highest-ranking Iranian official to visit the country since the 1979 revolution that brought the Islamic government to power. He has condemned terrorism and said he regretted the taking of American hostages by Iranian students in support of the revolution.
Meanwhile, Ahmadinejad has been campaigning for re-election since Day One of his presidency in 2005. His frequent and well-publicized visits to Iran's provinces are part of an effort to reach out to the Iranian people. He has doled out financial aid to the poor in his dozens of visits across the country and recently more than doubled the salaries of government employees and retirees' pensions.
Ahmadinejad has the support of Iran's supreme leader and the Islamic Revolution Guard Corps.
But the downturn in the global economy -- particularly the falling price of oil -- could still hurt the incumbent president's chances for re-election and he may need a strong turnout at the polls to secure a victory.
CNN's Shirzad Bozorgmehr contributed to this report.