Supporters of Iranian President Hassan Rouhani pose in front of posters depicting him during a campaign rally in Tehran on May 9. Rouhani will face off May 19 against five men looking to unseat him and is currently maintaining a wide lead over his nearest challengers. (Abedin Taherkenareh/EPA)

Iran’s presidential elections are typically tumultuous affairs. Campaigns last just a few weeks, and a candidate’s star can rise or fall in a matter of days. Ruling clerics approve only a handful of contenders for the race, which takes place every four years. But the results are almost always a surprise, and dark-horse candidates have been known to sweep to power at the last minute.

This year, there are five challengers to President Hassan Rouhani, a pragmatic moderate seeking a second term in the May 19 vote. Although polling is unreliable in Iran, two candidates recently have narrowed Rouhani’s still-wide lead: Ebrahim Raisi, a powerful conservative cleric, and Tehran’s hard-line mayor, Mohammad Bagher Ghalibaf.

Both have used populist messaging to hit Rouhani on the economy, which they say suffers despite sanctions relief, and have committed to upholding the nuclear deal Iran struck with world powers.

As the campaigns enter their final week, here is a closer look at Rouhani’s two leading rivals.

Ebrahim Raisi

Raisi, 56, is new to politics and was relatively unknown before the start of his campaign. But thanks to his close ties to Iran’s supreme leader, Ayatollah Ali Khamenei, the soft-spoken, uncharismatic cleric is considered perhaps Rouhani’s most credible challenger, despite wobbles.

Candidate Ebrahim Raisi (in turban), a powerful but uncharismatic cleric, has emerged as one of two leading challengers to Rouhani. (Atta Kenare/AFP/Getty Images)

He also has the support of Iran’s influential clergy and a powerful coalition of conservatives known as the Popular Front of Islamic Revolution Forces, or Jamna. The black turban he wears signifies his status as a descendant of the prophet Muhammad, and rumors have swirled that he could succeed Khamenei. Raisi has campaigned on job creation and bigger cash handouts for the poor, but he has remained vague on other issues, including foreign policy.

“He’s a pretty colorless character,” said Gary Sick, who was the principal White House aide on Iran during the country’s 1979 Islamic Revolution. “He is not well-known as a religious scholar. And he doesn’t have that much background in government, either.”

Raisi was born in Iran’s northeast in 1960 and studied in the holy city of Qom. He is a graduate of the Haghani school there, which Iranian American academic Vali Nasr called “the backbone of the clerical management class that runs Iran’s key political and security institutions.”

Raisi began his career as a prosecutor in the city of Karaj, west of Tehran, after the revolution. In that role, he allegedly served as a member of the “Death Commission” that oversaw the executions of thousands of political prisoners in 1988. The government never has officially admitted responsibility for the killings, but to many they nonetheless have cast a shadow over Raisi’s campaign.

“The main thing about Raisi and the one thing that is going to stick in people’s minds in Iran is his participation in that panel in 1988, where lots of people were killed for practically no reason at all,” said Sick, who is now a researcher at Columbia University’s Middle East Institute.

Raisi subsequently spent decades in the judiciary, including as deputy to the chief justice and later as attorney general. As deputy chief in 2009, Raisi supported crackdowns on protesters who opposed the disputed results of that year’s presidential election.

A commission was established to investigate the harsh government response. In a confidential cable sent to U.S. intelligence agencies from the U.S. Consulate in Dubai and later published by WikiLeaks, the State Department said that the body, which included Raisi, was “composed of men with long professional histories of egregious human rights abuses.”

An Iranian woman passes a poster of candidate Mohammad Bagher Ghalibaf in Tehran. Ghalibaf, Tehran’s mayor, has been running neck-and-neck with Raisi in recent polls. (Abedin Taherkenareh/EPA)

“The Iranian judiciary is by its nature very conservative and takes a restrictive approach to social and political freedoms,” said Farzan Sabet, a fellow at Stanford University’s Center for International Security and Cooperation. “And Raisi’s decades-long career as a judicial official reflects this.”

“It’s not certain,” Sabet added, “how this background would translate to the presidency.”

Raisi serves as the head of the Astan Quds Razavi, a charitable foundation linked to the Imam Reza Shrine in Mashhad, the holiest site in Iran. It is the country’s largest endowment, with business and real estate holdings worth billions of dollars. Khamenei appointed Raisi to the post — which many Iranians take as evidence of his support for his protege.

“He has been able to portray himself as a virtuous and competent candidate who is trusted by the supreme leader,” Sabet said.

Mohammad Bagher Ghalibaf

The third time’s a charm — at least that is what Ghalibaf seems to be hoping. This year marks the 55-year-old Tehran mayor’s third run for president, following bids in 2005 and 2013. During his long tenure on the Iranian political scene, he has morphed from war hero to showy politician to capable technocrat.

Today, Ghalibaf casts himself as an economic populist ready to care for the country’s poor, and he is running neck-and-neck with Raisi in the polls. Much like Raisi, he has pledged to boost cash subsidies and create “5 million jobs.”

Unlike Raisi, Ghalibaf has national name recognition. But recent corruption scandals and “a history of flip-flopping between liberal and conservative positions” probably will hurt his chances, said Cliff Kupchan, chairman of the political-risk firm Eurasia Group.

Mohammad Ali Shabani, editor of Iran coverage at Al-Monitor, an online news portal focused on the Middle East, said, “His one big weakness is the public’s lack of clarity about who he really is and what he seeks.”

The son of a dried-fruit seller, Ghalibaf was born in Mashhad in 1961. At a young age, he rose to prominence as a commander in the Revolutionary Guard Corps during the Iran-Iraq war. He flew sorties over Iraq and helped recapture the Iranian city of Khorramshahr. He was promoted to head of the Revolutionary Guard’s air force, where he signed on to a now-infamous letter urging Khamenei to crack down harder on student-led demonstrations in 1999.

Later, Ghalibaf became chief of Iran’s uniformed police and, in contrast to his earlier hard-line stance, is said to have professionalized the force and curbed many of its excesses.

Ghalibaf’s stewardship of the police “has given him the reputation of a competent, apolitical manager,” the U.S. Consulate in Dubai wrote in a confidential cable in 2005.

But that same year, Ghalibaf ended up running a failed presidential campaign — in which he traded his uniform for white suits and flashy sunglasses — against the firebrand populist Mahmoud Ahmadinejad. He then was chosen as mayor of Tehran, where he continued to forge a record as a skilled manager.

As mayor, Ghalibaf has expanded green space in an otherwise crowded and polluted city, upgraded road infrastructure and begun work on a new metro line.

“Most people give him a lot of credit for making Tehran more livable,” Sick said.

But then the allegations of corruption began to surface. And when the city’s Plasco high-rise caught fire and collapsed this year, killing at least 20 firemen, many residents blamed Ghalibaf.

Some see the Plasco incident “as a failure on the part of his office to enforce safety standards,” Stanford’s Sabet said. “This will turn off many voters.”

Another weakness, observers say, is Ghalibaf’s connection to Iran’s security establishment. Although his military credentials make him palatable to Khamenei and the Revolutionary Guard, which wields enormous influence, they could alienate younger voters, many of whom want the powerful security forces out of politics.

Ghalibaf has “a very warm and personable style and appearance,” the U.S. Consulate in Dubai wrote in the 2005 cable. “But Iranians don’t like the military when it comes to selecting civilian leaders.”