Mohammad Bagher Ghalibaf, Mayor of Tehran, shows his ink-stained finger after registering his candidacy for the upcoming presidential elections at the ministry of interior in the capital Tehran on April 14, 2017

Registration for next month's Iranian presidential election closed on Saturday, with more than 1,600 hopefuls signing up, including a last-minute entry by Tehran mayor Mohammad Bagher Ghalibaf.

The 55-year-old conservative mayor had given mixed signals about whether he would make a third bid for the presidency, but showed up at the interior ministry just before the deadline for registration.

There was also a surprise last-minute entry from first vice-president Eshaq Jahangiri, a close confidante of President Hassan Rouhani who registered on Friday.

It is assumed Jahangiri, a 60-year-old reformist, is running to offer an alternative in case Rouhani is disqualified by the Guardian Council, which vets the candidates. Others speculate he could be trying to raise his profile ahead of a more concerted bid in 2021.

"Rouhani and I are side-by-side," Jahangiri told reporters.

Rouhani, a politically moderate cleric who has stabilised the economy and overseen a partial rapprochement with the West, is widely seen as the man to beat, although there is little polling in Iran and past elections have thrown up major surprises.

His main challenger is considered to be hardline cleric and judge Ebrahim Raisi, 56, who also signed up on Friday.

In total, 1,636 people registered, including 137 women.

Almost all will be disqualified over the coming fortnight by the Guardian Council, which is controlled by religious conservatives.

The council has never permitted a woman to run.

Around half a dozen candidates are normally approved, with the campaign set to start on April 28 and the vote on May 19.

Ghalibaf was the runner-up to Rouhani in 2013. He is a war veteran, former Revolutionary Guards commander and police chief, who was picked by a grouping of conservatives as one of their top choices last week, along with Raisi.

With much of the focus this year on Iran's stagnant economy, he told reporters at the registration that he would create five million jobs and more than double Iran's revenues.

The biggest surprise from this week's registration was the appearance of former hardline president Mahmoud Ahmadinejad, 60, who shocked everyone by signing up against the advice of supreme leader Ayatollah Ali Khamenei.