Iran will refuse to negotiate with the U.S. as long as Washington maintains its campaign of “maximum pressure”—even if President Trump is re-elected, Iranian President Hassan Rouhani said Sunday.

Mr. Rouhani’s defiant remarks solidify Iran’s hard line in a face-off with the Trump administration that only weeks ago brought Washington and Tehran to the brink of war.

“It...