TEHRAN — The Islamic Revolution, which is now 36 years old, is never forgotten here — but some corners fear that it is fading from public view. Even as President Hassan Rouhani works to reintegrate Iran back into the global community, hard-line elements have stepped up their efforts to weaken his camp of political moderates and portray his government as naive about the threat posed by the United States. Circled by forces such as the Islamic Revolutionary Guard Corps (IRGC) and the judiciary, the president has started to look like a limited, fenced-in figure, incapable of changing too much about how the Islamic Republic operates.

Now, however, a new figure with the most famous last name in Iranian politics could become Rouhani’s inside man. Hassan Khomeini, the best-known grandson of Ayatollah Ruhollah Khomeini, registered on Dec. 18 as a candidate in next year’s elections for the Assembly of Experts. The 88-member committee is charged with selecting Iran’s next supreme leader when the incumbent, Ayatollah Ali Khamenei, who is 76 years old and is said to be ailing, dies. The young Khomeini is the first member of his family to seek public office since the death in 1989 of his feted grandfather, who founded the Islamic Republic and served as its first supreme leader. The only question is whether the 43-year-old will be allowed to embark on a path that could eventually lead to the very top of Iran’s complex power structure.

Hassan was born in Qom, the center of religious education in Iran, and home to the country’s clerical political establishment. Hassan’s father, Ahmad, was involved only peripherally in government, having played an influential role in assisting his own father after the long-exiled ayatollah’s triumphant return to Tehran in February 1979. Had he not died of a heart attack in 1995, Ahmad might have preceded his son’s entry to electoral politics.

But now it is Hassan who is moving to center stage.

Having studied and taught in Qom, his main job has been running the mausoleum in Tehran where his father and grandfather are interred, considered a hallowed task by many in Iran. He first started stirring notice in political circles in 2008, when he implicitly criticized Iran’s new political and military elite, which has filled its pockets even while preaching loyalty to the revolution’s founder and the Iranian people.

The IRGC, established by the first supreme leader to protect Iran from foreign and domestic threats, proved its worth during the Iran-Iraq war — but has since earned the enmity of many Iranians by engaging in widespread cronyism and throwing its weight behind the most hard-line figures in the Islamic Republic.

“Those who claim to be loyal to Imam Khomeini should follow his order that the military must stay out of politics,” the younger Khomeini said in an explosive speech when the IRGC was flexing its muscles in 2008 by supporting then-President Mahmoud Ahmadinejad. Khomeini met with reformists before the election the following year and then spoke out in support of the movement’s two defeated candidates, Mir-Hossein Mousavi and Mehdi Karroubi, who claimed the presidential ballot was rigged.

Keeping such company earned Khomeini some credit among moderates. He also shunned Ahmadinejad’s inauguration ceremony, depriving the event of the legitimacy of his family’s endorsement.

Supporters have long wanted Khomeini to enter the public arena. He is markedly younger than the current crop of top Iranian politicians and has already shown something of a youthful, common touch: He’s known to be a fan of Iran’s soccer league and has appeared as a guest on a popular television fanzine. On the show, he said he thought he could have had a career in the game if his grandfather had not ordered him to deepen his religious studies when he was 21 years old.

Khomeini’s 18-year-old son, Ahmad, is another asset. He has 188,000 followers on Instagram, which unlike Facebook or Twitter is not blocked in Iran and offers his father a unique platform to connect with young voters. The Instagram feed provides an insight into the societal change that Khamenei shows no willingness to acknowledge: Photos show Ahmad in Nike sports clothes at a time when Khamenei says American brands should be banned. Yet the teenager is also reverent toward his ancestors, posting pictures of his great-grandfather (who famously branded America “the Great Satan”) and he has taken part in religious ceremonies himself, seamlessly inhabiting both the old and new Iran.

Hassan Khomeini, meanwhile, already has a powerful array of allies for the forthcoming election. Rouhani and Ayatollah Akbar Hashemi Rafsanjani, a former president, are his main public backers; both are members of the Assembly and will seek new eight-year terms — a tenure Khamenei may not outlive.

Mohammad Khatami, Iran’s last reformist president, and another figure close to Khomeini, is less likely to be seen in public as the elections approach. Exemplifying the tension at the top of the political system, Khatami’s image is banned by the authorities, after being cast aside and dubbed a “seditionist” by the regime ever since the pro-democracy protests of 2009. However, the former president has shown he still has political influence: It was he who urged Mohammad Reza Aref, a reformist, to withdraw in the 2013 presidential election, which allowed Rouhani to win by consolidating the support of moderate voters.

But there are other members of Iran’s political system who want Khomeini to stay out of public life. His potential adversaries know him as a moderate cleric, similar to Rouhani, but much younger and with reformist instincts. Already weakened and angry at Rouhani’s nuclear deal, Iran’s conservative political faction is anxious that the Feb. 26 elections for the Assembly of Experts and the parliament could see their influence reduced further. If things go really badly for the conservatives, they could even be reduced to third place in parliament — lagging behind moderates backed by the president and a quiet but potentially reinvigorated reformist faction.

Iran’s powerful military establishment is also mobilizing against the idea that Khamenei should not be succeeded by one person, but rather by a decision-making body composed of the country’s most senior figures. The idea has been floated by those close to Rafsanjani, a figure staunchly opposed by the military.

“If the leadership becomes a council, the country will suffer and our strong unity against America, Zionists, and imperialist enemies will break down,” Hassan Fayrouz Abadi, the chief of staff of the Iranian armed forces, said on the same day Khomeini became a political candidate.

It’s not the first time Khomeini has risked running afoul of the most committed Khamenei loyalists. In a sign of the tension long before he declared he was running, Ansar-e Hezbollah, a radical faction that professes loyalty to the principles of the revolution, threatened him seven months ago from making a public speech.

Given Khomeini’s lineage, the hard-liners will have an especially hard time painting him as outside the bounds of Iran’s political system. But Khomeini’s last name can offer him only so much protection if he chooses to align himself with reformists — and, hence, against the conservative clerical establishment to which the military is loyal. The IRGC and the Basij, an allied paramilitary volunteer force, responded to the pro-democracy Green Movement that emerged in 2009 after Ahmadinejad’s disputed reelection with a vicious crackdown — one that didn’t spare the families of Mousavi and Karroubi, two leading figures of the Islamic Revolution, and friends of the elder Khomeini.

Today, the very same forces are circling Rouhani. They have used their powers to embarrass him with the recent arrests of foreigners and the conviction for espionage of Washington Post journalist Jason Rezaian. The head of the IRGC, Gen. Mohammad Ali Jafari, has even warned darkly that the nuclear deal could spearhead a new attempt to overthrow the regime.

“We consider negotiations equal to infiltration,” said the powerful military chief about Rouhani’s crowning achievement. “It is unfortunate that some domestic officials do not understand this.”

The president himself has yet to openly criticize the IRGC, but he has repeatedly hinted at his annoyance at the force and Iran’s other hard-line bulwark, the judiciary, as well as conservative media outlets for undermining the government.

“You learn from some publications who will be arrested tomorrow, what is going to be closed down tomorrow, which individual’s reputation should be damaged,” Rouhani said on Nov. 8, less than two weeks after the Guards had detained the American-Iranian businessman Siamak Namazi. While Rouhani has spoken of a prisoner swap of detained Iranians for its American prisoners, the judiciary has even stayed silent on the length of Rezaian’s jail sentence, a sign of its detachment from the president.

The official campaign season for next year’s elections runs for only two weeks for the Assembly, and one week for the parliament — but the battle for influence has been raging for months. The polls for the Assembly carry more potency than normal, because of renewed speculation about the health of Khamenei, who underwent prostate surgery in 2014. The supreme leader is viewed as above criticism, but talk of the succession is growing and has received some level of official blessing. Rafsanjani — who, despite being older than Khamenei, is still seen as a potential successor — recently revealed that the Assembly has started to look at potential replacements.

While a startling admission in itself, the announcement takes on new relevance because of Khomeini’s entry to politics. Khamenei’s inner circle has been struggling to identify a successor who has the necessary combination of religious training, political influence, and public charisma to lead the country. Unlike most of the names mentioned — such as Rafsanjani or judiciary chief Sadegh Larijani — Khomeini bears the black clerical turban, which denotes his direct lineage to the Prophet Mohammed.**

Although Khomeini’s name alone will not get him the job of supreme leader, the situation could quickly change. A few years on the Assembly could burnish his credentials, as well as neutralize the issue of his relative youth. Alternately, if the succession comes quicker than that, he could swing support for a less hard-line candidate.

What is not in doubt is that Khomeini has become the man of the moment, enlivening Iran’s politics and bringing the high stakes in Tehran to the fore. Like his grandfather, he could well emerge as a major figure at a critical point in the country’s political history. But first, he has to outmaneuver his powerful hard-line rivals.

Correction: This sentence initially included former judiciary chief Ayatollah Mahmoud Hashemi Shahroudi as a potential successor to Khamenei who does not trace his lineage back to the Prophet Muhammad.. In fact, Shahroudi is accepted as a descendant of the Prophet.