By Parisa Hafezi

ANKARA (Reuters) - A year after Iran's nuclear deal with the West, hardliners are gaining authority in a backlash against pragmatic President Hasan Rouhani that his allies say could leave him sidelined or push him out of power in an election next year.

Rouhani, who was elected in a landslide in 2013 on a promise to reduce Iran's diplomatic isolation, delivered the agreement that resulted in a lifting of financial sanctions in return for curbs on Tehran's nuclear program.

The deal had the grudging approval of Supreme Leader Ali Khamenei, the arch-conservative in office since 1989, whose ultimate authority outranks that of the elected president.

But now that the negotiations are over, Rouhani's supporters say that Khamenei and his followers are trying to restrict the president's authority or replace him. In the face of such pressure, Rouhani himself may decide not to stand again.

Already, hardliners are blaming the president's faction for the failure of the deal to deliver a swift improvement in living standards, at a time when prices for oil exports are low and promised foreign investment has yet to arrive.

"The political infighting has intensified in Iran. The legitimacy of the establishment is at stake," said a senior official, who asked not to be identified.

"It will deepen further until the presidential election next year," the official said, adding that Rouhani himself now had "serious doubts about running for a second term".

Rouhani's allies believe his personal popularity and the prospect of Iran coming out of its political and economic isolation have panicked hardline allies of Khamenei, who fear losing power and aim to bring the presidency to heel.

"Hardliners want a president who is closer to their camp and gets his directions from Khamenei's allies," a reformist former official said, speaking on condition of anonymity like other figures within Iran contacted for this story.

"If they fail to find a candidate, then they will impose more limits on Rouhani in his second term."

"REVOLUTIONARY IDEOLOGY"

Iran's political system allows elections for president and parliament, but gives a hardline watchdog body power to veto laws and decide which candidates may stand.

Since taking over from the Islamic Republic's founder Ayatollah Rouhollah Khomeini, Khamenei, now 76, has made sure that no group, including among his own hardline allies, has gained enough power to challenge his authority.

Khamenei's allies control the bulk of financial resources as well as the judiciary, the security forces, public broadcasters and the Guardian Council which vets laws and election candidates.

"Khamenei's ideal set-up is to have weak presidents who can be held accountable for the frustrations and economic malaise that many Iranians feel," said Iran analyst and senior associate at the Carnegie Endowment for International Peace Karim Sadjadpour.

What mattered most for Khamenei was not "the support of the electorate, but the support of the protectorate," he said.

"Khamenei can live without the admiration and social media likes of Iran's urban sophisticates, but not without the loyal support of 150,000 Revolutionary Guardsmen and their Basij henchmen," said Sadjadpour, referring to an elite military force and its affiliated militia.

NOT NEEDED NOW TALKS ARE OVER?

The parlous state of Iran's economy pushed Iran's top leaders to accept Rouhani as the best option to resolve their nuclear dispute with the West. But Rouhani's allies believe that those close to Khamenei no longer see Rouhani as useful.

"Now the nuclear crisis is over. Hardliners want to retake the control by weakening Rouhani. An election victory next year will cement hardliners' grip in power," said a Rouhani ally.

"Rouhani was elected to resolve Iran's nuclear issue."

In recent months Khamenei has spoken about the importance of "revolutionary ideology" and the "resistance economy", seen as veiled criticisms of Rouhani's policies of political and economic engagement with the West.

There is no clear challenger lined up to stand against Rouhani yet, but hardliners could reach a consensus on a high-profile candidate for the election in coming months.

"Rouhani's policy of interaction with the world ... scares the hardliners as they believe that without confrontation, particularly with the West, the Islamic Republic could stop being a revolutionary state," said Meir Javedanfar, an Iranian-born Israeli lecturer on Iran at the Interdisciplinary Center Herzliya in Israel.

The hardliners fear that could ultimately "lead to the establishment's collapse," he added.

"HIGH EXPECTATIONS"

Hardliners have criticized Rouhani for the slow pace of economic recovery, saying his government was duped into accepting concessions on Iran’s nuclear program while getting little back in return.

"The focus at the moment is of course on the economy and that will be the battleground for the next election," said Ali Ansari, director of the Institute of Iranian Studies at the University of St. Andrews.

"The expectations Rouhani created around the deal were going to be difficult to reach, and popular disappointment, no doubt encouraged by the hardliners, is likely to rebound on him."

Partly because of unilateral U.S. sanctions that remain in place, major European banks and investors are holding back from doing business with Iran.

So far, Iran has secured banking links only with smaller financial institutions, and the U.S. banks remain prohibited from doing business with Iran directly or indirectly.

Foreign investors also face other risks, like complex regulations, lack of transparency within Iran's banking system, unclear dispute resolution mechanisms, labor issues and corruption.

For many ordinary Iranians, a sense of disillusionment has set in, because expected economic improvements have failed to materialize, and Rouhani's government has fallen short of delivering a hoped-for easing of social restrictions.

The government was tainted by the leak of payslips of some top executives, which were dozens of times the average monthly income of an Iranian urban household. The source of the leak has yet to be identified.

"I am struggling to pay my rent and look at the salaries these people get. They only care about people when our votes are needed," said government employee Reza, 32, who said he voted for Rouhani.

(Writing by Parisa Hafezi; editing by Peter Graff)