Story highlights Ahmadinejad was known for his fiery foreign policy rhetoric while president

He served two terms in office, during which he pushed forward Iran's nuclear program

(CNN) Iran's conservative former President Mahmoud Ahmadinejad has registered to run in the country's presidential elections in May, according to state media.

The news is unexpected, as Ahmadinejad was instructed last September by Iran's Supreme Leader Ayatollah Ali Khamenei not to run.

This could set up a contest pitting Ahmadinejad, known for his hardline views, against the incumbent President Hassan Rouhani, who has pursued a more moderate path since winning the 2013 election.

On Tuesday, the first day of the five-day registration process, 126 people -- including six women -- registered as candidates, state news agency IRNA reported. Rouhani hasn't yet registered, but is widely expected to do so.

Iranian President Hassan Rouhani gives a press conference in the capital Tehran on April 10, 2017.

Ahmadinejad, who was president from 2005 to 2013, registered at the Interior Ministry alongside his former senior aides Esfandiar Rahim Mashaei and Hamid Baghaei, according to Mehr news agency.

Read More