By Marcus George

DUBAI (Reuters) - A moderate cleric best known for his conciliatory nuclear talks with world powers has emerged as the sole beacon of hope for reformists in the campaign for Iran's presidential election on Friday.

Hassan Rohani is someone world powers might prefer to replace hardline populist incumbent Mahmoud Ahmadinejad and pursue peaceful ways out of an increasingly tense standoff with Iran over its nuclear activity.

Rohani's focus on rehabilitating Iran's foreign relations and its sanctions-battered economy and his call for a "civil rights charter" are appealing to the significant number of Iranians keen for more political pluralism and social freedoms and an end to the Islamic Republic's international isolation.

But Tehran's hardline establishment may regard this as a challenge to clerical Supreme Leader Ayatollah Ali Khamenei.

Whether Rohani can attract enough votes to win from a constituency widely disillusioned by a four-year security crackdown on reformists, with some in doubt that any non-conservative will even be allowed to prevail, is unclear.

Khamenei, determined to prevent a rerun of 2009 when opposition leaders alleged fraud in Ahmadinejad's re-election and millions took to the streets in protest, wants to see a loyal "principlist" win big and ensure no further dissent.

Reformists led by former president Mohammad Khatami endorsed Rohani on Tuesday after their own candidate withdrew from a field dominated by conservative Khamenei loyalists.

Rohani picked up further momentum with the endorsement of his mentor, former president Akbar Hashemi Rafsanjani, a veteran rival of Khamenei who was disqualified from running last month.

Analysts say one of several conservative candidates close to the supreme leader has the best chance of winning on Friday or a possible run-off election a week later if no contender secures 50 percent of the vote.

But with bold calls for moderation, Rohani is showing signs of challenging any front-runner if the election turnout is high.

Rohani has pledged to draw up and implement a "civil rights charter, promote a foreign policy based on "constructive interaction with the world", and has spoken up for the rights of women and ethnic minorities.

"If he could energize the youth and the middle class ... Rohani could present a real alternative - loyal to the supreme leader but also the only candidate who has talked civil rights and even addressed people's grievances in 2009," said author and Iran analyst Hooman Majd. "He is also highly competent."

CRITICISM OVER CONCILIATORY TALKS

Rohani, 64, headed the Supreme National Security Council under Ali Akbar Rafsanjani, a relative pragmatist seen as a master of realpolitik, and under Khatami, who pushed for wide-ranging social and political reforms.

He presided over talks with Britain, France and Germany that saw Iran agree to suspend uranium enrichment-related activities between 2003 and 2005 pending further negotiations on economic concessions from the West that ultimately went nowhere.

He resigned after Ahmadinejad took office in August 2005 and enrichment work resumed. Rohani was accused of being too accommodating in negotiations - a criticism that hardline rivals have been trying to exploit.

"Even if Rohani's campaign succeeds in animating part of the population, he will be vulnerable to vociferous attacks by conservatives who criticize his approach to nuclear diplomacy, which they view as naïve and too compromising," said Ali Vaez of the International Crisis Group.

But Rohani has shown he will not roll over easily.

In a May 27 interview on Iranian state television, Rohani had a contentious exchange with a news anchor, calling him "illiterate" for saying Iran's nuclear program halted during his tenure as nuclear negotiator. "This is a lie," he said.

Rohani said Iran continued to make nuclear advances while he was head of the national security council and that he had steered the country successfully away from threats of attack.

"We didn't allow Iran to be attacked. Remember the sensitive conditions at the time ... they had gotten Afghanistan, they had occupied Iraq. They imagined tomorrow or the day after tomorrow it would be Iran's turn," referring to the U.S. military.

REVOLUTIONARY CREDENTIALS

Few question the revolutionary credentials of the mid-level Shi'ite cleric, who was active in the opposition that toppled the Shah in 1979. He remains on the security council and is also on the Expediency Council and the Assembly of Experts, two eminent advisory bodies in Iran's multi-tiered power structure.

Rohani boasts military experience through prominent roles in Iran's 1980-88 war with Iraq, including as commander of national air defense, according to his official biography.

He has, however, maintained a centrist outlook shared with former president Rafsanjani, a close ally.

Rohani hinted he would stand aside if Rafsanjani joined the race. But the Guardian Council, the state body that vets all election candidates, barred Rafsanjani. He would have posed the most significant independent threat to Khamenei's supremacy.

Rohani now appears to be attracting notable numbers of opposition supporters who were inspired by Rafsanjani's candidacy and then angered by his disqualification.

At a June 1 rally in Tehran, people shouted slogans in favor of detained opposition chief Mirhossein Mousavi, according to an opposition website and video posted on YouTube.

Rohani has criticized the pre-election increase of police and Islamist militia in the streets, apparently to dampen any temptation for new unrest. "Why should there be a security atmosphere everywhere? In the streets, universities, schools, organizations, we must put an end to this security atmosphere."

BROKEN ECONOMY

During Ahmadinejad's two terms in office, tension with the West over Iran's nuclear program has risen with the United States and Europe imposing sanctions on its oil and banks over suspicions Tehran is seeking atomic bombs, something it denies.

The tightening international noose has sent Iran's currency, the rial, into steep decline and exacerbated the impact of what critics say has been Ahmadinejad's bumbling economic management.

Rohani has bemoaned the plight of the economy and, suggesting it was caused in part by Iran's increasing international isolation over its nuclear hardline, pledged the creation of a "government of prudence and hope" if elected.

"Looking at the state of the country and urban and rural problems, the young and the old, the students ... everyone knows what problems and social issues we are facing in everyday life," he said in a recent interview on state television. "Is there a family out there that isn't affected by unemployment?"

To mount a credible challenge, let alone stand any chance of victory, analysts agree Rohani will have to mobilize widespread support from pro-reform groups who have been marginalized by the 2009 vote and muzzled over the ensuing four years. With state power and patronage boosting hardliners, that is no easy task.