TEHRAN, Iran -- A conservative candidate dropped out of Iran's presidential election on Monday to back a hard-liner, state television reported, narrowing the field of those hoping to unseat moderate President Hassan Rouhani.

The report said Tehran Mayor Mohammad Bagher Qalibaf made the decision to boost the chances of hard-liner Ebrahim Raisi, believed to be close to Supreme Leader Ayatollah Ali Khamenei.

"I ask all my supporters to contribute their full capacity and support for the success of my brother, Ebrahim Raisi," Qalibaf said in a statement announcing his withdrawal, according to the state TV.

Qalibaf's decision brings the number of candidates competing in Friday's election to five, though more may drop out in the coming days to solidify support for other candidates.

This election marked Qalibaf's third presidential campaign, having previously lost running to the left of hard-line President Mahmoud Ahmadinejad in 2005 and to the right of Rouhani in 2013.

Also, many residents in the country's capital had been angry at Qalibaf and Tehran authorities after a massive January fire at a historic high-rise caused the building to collapse, killing 26 people, including 16 firefighters.

Raisi, a former attorney general, serves as the head of the Imam Reza charity foundation, which manages a vast conglomerate of businesses and endowments in Iran. Qalibaf's dropping out may serve to get him more votes in his challenge to Rouhani. Some also have speculated that Qalibaf could serve as a vice-president in Raisi's administration, in exchange for his support.

The election is largely viewed as a referendum on the 2015 nuclear deal struck with world powers shepherded by Rouhani's administration. That deal saw Iran limit its enrichment of uranium in exchange for the lifting of some economic sanctions.

Rouhani remains the favourite as every Iranian president since 1981, when Khamenei himself took the presidency, has won re-election.

However, most Iranians have yet to see the benefits of the nuclear deal. Raisi has been campaigning on that, proposing populist cash payments for the poor that have proven popular in the country in the past under Ahmadinejad.

Raisi already has the support of two major clerical bodies that declined to endorse anyone in the last presidential election, snubbing Rouhani, who himself is a cleric.

However, Raisi's candidacy also has revived the controversy surrounding Iran's mass execution of thousands of prisoners in 1988, one of the darkest moments of the country's history since the 1979 Islamic Revolution and one still not acknowledged by its authorities.

Raisi allegedly served on a board that sentenced some of the prisoners to death, something he has not discussed during his campaign, though his supporters have made a video defending his involvement.