Mahmoud Ahmadinejad has registered to run for his third term as Iran's president, putting a jolt into next month's elections. He's the latest hardline challenger to emerge against President Hassan Rouhani, declaring his candidacy in a move that caught many by surprise.

"Ahmadinejad's re-election in 2009 provoked street protests that were violently put down," NPR's Peter Kenyon reports. "Hardliners have struggled to rally behind a single candidate to challenge President Rouhani, who's hoping that a general uptick in the economy since the Iran nuclear deal with world powers will boost his chances. The recovery, however, has yet to reach most ordinary Iranians."

Ahmadinejad, 60, had been expected to sit out the election set for May 19 — in fact, that's what he said he would do last September, adding that he was obeying the wishes of Iran's Supreme Leader Ayatollah Ali Khamenei, according to the news site al-Monitor.

Khamenei has said he told Ahmadinejad not to seek a third term "both for his own and the country's good," as the Tehran Times reports.

But Ahmadinejad said today that he interpreted that statement not as an order, but as advice. The Times quotes two Iranian political analysts who say they don't think Ahmadinejad's candidacy will be accepted; such a rejection could bring protests and would deepen a rift between Khamenei and Ahmadinejad that's been traced as far back as 2007.

More than 126 people have registered to run for the presidency, Iran state media says. The final list of candidates will be announced in two weeks, after an Interior Ministry council reviews the list.

Ahmadinejad was in office from 2005-2013, but his 2009 win came under a cloud of vote-rigging accusations. When Khamenei approved the re-election in a ceremony with Ahmadinejad in Tehran, the two engaged in an awkward embrace in which Ahmadinejad did not kiss the ayatollah's hand as he had done in the past, but instead sort of nuzzled the leader's shoulder.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.