Former two-term President Mahmud Ahmadinejad, a fierce conservative who was in power during a harsh crackdown on dissenters before seemingly falling afoul of Iran's supreme leader, has registered to run in next month's presidential vote.
It is unclear whether the powerful vetting body that routinely bars hundreds and even thousands of potential candidates from elections will approve his bid.
And he suggested his April 12 appearance was merely an attempt to raise the profile of a controversial political ally who registered alongside him for the race, Hamid Baghaei.
But Ahmadinejad's registration flies in the face of a public appeal by the country's highest political and religious authority, Supreme Leader Ayatollah Ali Khamenei.
Ahmadinejad left office in 2013 amid rumors of a falling-out with Khamenei and with the opposition still simmering over mass arrests and violence in a crackdown following protests over alleged irregularities in Ahmadinejad's reelection in 2009.
"If his candidacy is approved, then he hasn't been eliminated from Iran's political circle," Paris-based analyst Taghi Rahmani told RFE/RL's Radio Farda. "Ahmadinejad seems to believe he has nothing to lose. If he's disqualified, he believes that it would bring him honor in the future for standing up to [Khamenei]."
Khamenei was said to have indirectly cautioned Ahmadinejad last year against a new bid for the presidency, saying he had told "someone" who approached him for guidance to stay out of the election "both for his own good and also for the good of the country."
"I told him I do not find it advisable for him to participate," the 77-year-old Khamenei added in what was reported by Iranian media in September to be a reference to Ahmadinejad.
His candidacy could hint at a failure by conservatives and hard-liners to mount a unified challenge to incumbent President Hassan Rohani, who has not officially registered but held a wide-ranging press conference on the eve of the five-day registration period to tout his perceived achievements.
A former prosecutor with hard-line credentials who is also said to be a consideration to eventually replace Khamenei, Ebrahim Raisi, recently announced his own candidacy.
On April 12, Ahmadinejad told reporters that Khamenei had not expressly forbidden him from running. "The supreme leader recommended that I not participate in the election as a candidate. I accepted that, although his advice was not a ban. He said, 'I am not telling you whether to register or not,'" Ahmadinejad said.
Ahmadinejad said he was registering in support of former Vice President Baghaei, who applied to be a candidate alongside his former boss but could be excluded by the powerful Guardians Council over an arrest in 2015.
"Despite massive pressure from the people for me, a servant of the people, to enter the [race], I remain committed to my moral promise and I merely registered here to support my dear brother, Baghaei," Ahmadinejad told reporters after submitting his name.
Another member of Ahmadinejad's inner circle, former aide Esfandiari Rahim Mashaei, who was himself disqualified from the presidential race in 2013, was also present at the April 12 registration.
Hossein Rassam, a former adviser to the British Foreign Office, says he regards Ahmadinejad's move as an effort to impress on the authorities the potential price of a disqualification of Baghaei.
"It's an explicit warning, not just to the Guardians Council but also to Khamenei himself, that he would [be willing to renege] on the commitment he made on not running" if Baghaei is eliminated.
Rassam says the message was: "You stick to your side of the deal and I will stick to mine. [So] let Baghaei run."
Ahmadinejad's reelection in 2009 led to mass street protests amid allegations of extensive vote rigging. The establishment responded with a crackdown that left dozens of opposition protesters dead and thousands more people in jail, and allegations of widespread torture of those in custody.
But he also frequently traveled to Iran's regions with a populist message and promises of economic assistance from Tehran.
Ahmadinejad's presidency was marked by increasing domestic quarrels and tensions with the West.
He had said last week that he was not planning to run and would support Baghaei.
If allowed to run, Ahmadinejad could split the hard-line vote, Rassam says. "Ayatollah Khamenei wanted to avoid a polarized election when he asked Ahmadinejad not to run so that [Ahmadinejad] would not be representing one end of the [political] spectrum while Rohani is representing the other end," he says.
The Guardians Council has a record of disqualifying those it regards as a threat to the clerical establishment, including unelected officials like the supreme leader.
In 2013 it prevented ex-President Akbar Hashemi Rafsanjani, who died earlier this year, from running again for the same office.
Baghaei was jailed for several months in 2015 on charges that remain unclear.
A final list of the candidates cleared to run is due to be released by April 27.
With reporting by RFE/RL's Radio Farda reporter Mehrdad Ghassemfar, IRNA, and ISNA