Iran’s supreme leader, Ayatollah Ali Khamenei, has said in a televised address that Iran will expand its nuclear program and will not negotiate with the United States, doubling down on his defiance of the Trump administration’s “maximum pressure” policy. In a Friday speech for the Eid al-Adha holiday, Ayatollah Khamenei said that entering talks with Washington over Iran’s nuclear program, as President Trump has urged Tehran to do, would only improve Mr. Trump’s chances of being re-elected in November. That, the ayatollah said, was Mr. Trump’s reason for suggesting such talks in the first place.

“He is going to benefit from negotiations,” Ayatollah Khamenei said. “This old man who is in charge in America apparently used negotiations with North Korea as propaganda,” he added — a reference to Mr. Trump’s high-profile nuclear diplomacy on another front, which to date has been mostly fruitless. Ayatollah Khamenei also said that Iran would maintain its close alliances with militia groups in the region that it uses as proxies, defying another demand from the Trump administration.

The Iranian leader was not the first to connect the possibility of talks with the United States to the presidential election. Last month, Mr. Trump said on Twitter that Iran could make a better deal if it did so before November. “Don’t wait until after U.S. Election to make the Big deal,” he wrote. “I’m going to win. You’ll make a better deal now!”

The United States has continued to tighten sanctions on Iran over its nuclear program, which have had a crippling effect on the Middle Eastern country’s economy. On Thursday, Secretary of State Mike Pompeo said that the State Department would expand the sanctions to cover 22 materials believed to be used in Iran’s nuclear, military and ballistic missile programs.