By Parisa Hafezi
ANKARA (Reuters) - Iranians will shape the future of the Islamic republic for at least a decade when hardline and moderate candidates battle next week in elections for parliament and the body which will choose the country's next supreme leader.
Allies of pragmatist President Hassan Rouhani, buoyed by Iran's nuclear deal, hope to gain influence, but moves by hardliners to block moderate candidates and disillusion over Rouhani's stalled reforms leave them with an uphill task.
Last year's nuclear accord led to the lifting of crippling international sanctions, offering the hope of economic upturn and better living standards for many Iranians.
But the potential opening up to the world - and Rouhani's increasing popularity - have alarmed hardline allies of Supreme Leader Ayatollah Ali Khamenei and have intensified the political infighting within Iran's complex power structures.
The hardline Guardian Council, which vets candidates and laws, blocked thousands of mostly moderate hopefuls from standing in the Feb. 26 parliamentary election.
It also barred nearly 80 percent of candidates standing in an election held on the same day for the Assembly of Experts, which will eventually choose the 76-year-old Khamenei's successor.
The council vets parliamentary candidates based on their loyalty to Iran's constitution and clerical leadership.
"In total 6,229 people, out of nearly 12,000 registered hopefuls, have been qualified for the parliamentary vote," said senior Interior Ministry official Hosseinali Amiri, the semi-official Fars news agency reported.
Campaigning for the parliamentary election starts on Thursday and lasts for a week.
Even if his hardline allies were to lose the parliamentary race to their moderate rivals, Khamenei will continue to hold ultimate authority in matters of state, while presidents and lawmakers will come and go.
Khamenei, supporting the Guardian Council's strict vetting, has repeatedly warned that Iran's enemies have sought to use the elections to "infiltrate" its power structure.
"I won’t get tired of saying the truth again and again ... The enemy pursues infiltration into the elections. People must be aware of that and act against what the enemies seek," Khamenei said on Wednesday,
Moderates want to have a say in choosing Khamenei's successor by winning more seats in the assembly, whose 88 elected members will remain in place until 2024.
In the past, debate about Khamenei's possible successor was considered as undermining the supreme leader, but public discussion has gained momentum ahead of the elections.
"Khamenei is 76 years old and he has medical issues. The Assembly of Experts' vote will designate future of Iran because the next assembly has to pick the next leader," said a Tehran-based analyst on condition of anonymity.
In a move which may have been aimed at maintaining hardline domination of the assembly, the Guardian Council approved only around 166 candidates out of 801 registered hopefuls.
"The Assembly vote is very important ... They will select the supreme leader when it is necessary ... Therefore the enemy is very sensitive about the Assembly," Khamenei said.
Among those disqualified from the assembly was Hassan Khomeini, an ally of Rouhani and a grandson of Ayatollah Ruhollah Khomeini, the late leader of Iran's 1979 revolution.
The supreme leader has substantial influence, or constitutional authority, over the executive, legislative and judicial branches of government as well as the military and media.
"With more moderates in the assembly, Iran can have at least a less hardline leader after Khamenei or even a moderate leadership council to lead the country," the analyst said.
Iran's former president Akbar Hashemi Rafsanjani angered hardliners in December when he said the assembly would be open to choosing "a council of leaders if needed" instead of a single supreme leader who rules for life.
Rouhani and Rafsanjani are both members of the assembly and will run again in next week's vote.
Under Iran's constitution, a transitional "Leadership Council" is permitted until a supreme leader is selected by the assembly. But analysts said Rafsanjani advocated a permanent council, fiercely rejected by Khamenei's hardline allies.
The outcome of the parliamentary vote, essentially a contest between hardline and moderate factions, will have no big impact on Iranian foreign policy. But it will boost the victorious faction's influence in next year's presidential election.
A friendly parliament could strengthen Rouhani's hand to push through economic reforms to open up the country to foreign trade and investment. It can also help the government carry out a political agenda aimed at expanding social and economic liberties, as promised during his 2013 election campaign.
"A moderate-dominated Majles (parliament) will not challenge Rouhani's promised reforms as the current one did. Harmony between the executive and legislation bodies will help officials to serve people better," said a senior Iranian official.
Moderates hope that economic and political benefits of the nuclear deal would translate into votes for Rouhani's allies in the polls.
"Iranians understand that if they want reforms, they should have a moderate parliament to help Rouhani carry out his social and cultural policies," said the official.
But many voters - particularly women and young people - who pinned their hopes in 2013 on Rouhani to bring social change and greater freedom, have grown disillusioned since he took office and may be reluctant to support his candidates next week.
Rights campaigners say there have been few, if any, moves to bring about greater political and cultural freedoms.
Analysts said the stakes for Khamenei are high and he will seek to limit Rouhani's popularity and influence.
"Losing control over the parliament would be a major political blow to hardliners, who then only would have control over the judiciary among Iran's three branches," said political analyst Hamid Farahvashian.
Khamenei appoints head of the judiciary, which has cracked down on activists and journalists in the recent months, aimed at displaying limits of Rouhani to create a freer society, demanded by moderate supporters of the president.
Human rights groups and the United Nations have criticized Iran for what they say is a crackdown on freedom of expression and the media.
(Additional reporting by Bozorgmehr Sharafedin in Dubai; Writing by Parisa Hafezi; Editing by Dominic Evans)