An cleric walks with a companion past election posters depicting presidential candidate Ebrahim Raisi in the Iranian city of Karaj on April 28. Raisi and five other contenders for the presidency faced off in the second of three televised debates Friday. (Abedin Taherkenareh/European Pressphoto Agency)

Each of Iran’s six presidential candidates committed Friday to uphold a nuclear deal with world powers should he win the May 19 election, a vote widely seen as a potential referendum on the accord’s benefits for average Iranians.

The statements of support came during a debate that was broadcast live on Iranian state television, the second of three scheduled for the short campaign season. President Hassan Rouhani, whose government negotiated the deal in exchange for sanctions relief, is facing five challengers. His critics have blasted the agreement, whose signatories include the United States, saying it has failed to usher in economic prosperity.

The moderate Rouhani sought to defend his signature achievement against such criticisms, saying that without it, “instead of producing 2 million barrels of oil a day, that number would be as low as 200,000 barrels a day.”

And he challenged his opponents — including hard-line cleric Ebrahim Raisi and Tehran’s conservative mayor, Mohammad Bagher Ghalibaf — to clarify their positions on the issue. “The candidates today should tell people in a straightforward manner what they plan to do” about the agreement, Rouhani said.

The deal, known as the Joint Comprehensive Plan of Action, limits Iran’s nuclear program but has lifted some of the harshest sanctions on the country’s economy. Oil exports have rebounded, and inflation has dropped to single digits. But unemployment remains high, and non-oil-sector growth is sluggish.

Ultimately, none of the contenders said they would withdraw from the agreement, which also has the backing of Iran’s supreme leader, Ayatollah Ali Khamenei, the country’s ultimate political and religious authority.

“Any administration that comes to power should be committed to the JCPOA,” said Raisi, who is seen as Khamenei’s favorite although he is viewed as having done poorly in a debate last week. “The nuclear deal, despite its shortcomings, is a national document.”

The Trump administration has announced that it is conducting its own review of the agreement.

Apart from the nuclear deal, the debate Friday focused largely on the candidates’ views of Iran’s place in the world. The three other contenders are a conservative former culture minister, Mostafa Mirsalim; Vice President Eshaq Jahangiri, a moderate; and former vice president Mostafa Hashemitaba, a reformist.

Asked about foreign policy priorities, Rouhani highlighted his government’s use of diplomacy to achieve its objectives, particularly in the region.

“We shouldn’t think that diplomacy is weak,” he said, adding that Iran is stronger on several fronts than it was just a few years ago. “It is in the field of diplomacy that we are discussing security in the region and in Syria.”

Iran has sent thousands of fighters and military advisers to battle rebels opposing the Syrian government. But the war did not feature prominently in the debate.

Raisi said Iran’s diplomacy should mainly serve the country’s “resistance economy,” which encourages domestic production in the face of international sanctions.

Raisi and Ghalibaf, Rouhani’s most formidable opponents, have accused him of favoring foreign investors over local manufacturers, tapping into the populist message that helped deliver the presidency to another firebrand former Tehran mayor, Mahmoud Ahmadinejad, in 2005.

Alluding to the nuclear deal’s effects on the economy, Ghalibaf asked: “What have they been? People rightly say nothing has happened.”