BOTH U.S. and Iranian officials are hinting that a final nuclear deal may not be reached by a Tuesday deadline. And no wonder, judging from the speech delivered Tuesday by Supreme Leader Ayatollah Ali Khamenei. Iran’s ruler spelled out conditions that would make an accord impossible, short of a complete capitulation by the United States and its five partners. He rejected a long-term limitation of Iran’s uranium enrichment, curbs on its research and development and international inspections of military facilities, and he said all U.S. and United Nations sanctions must be lifted “immediately after the signing of the agreement.”

According to the Obama administration’s description of the preliminary settlement reached in April, Iran’s negotiators have already crossed a couple of those red lines; a 10-year limit on enrichment is at the heart of the prospective deal. Other Khamenei strictures, such as the ban on inspections of military bases, would make it impossible to verify Iran’s compliance.

It’s possible that the ayatollah’s speech was a bluff intended to improve Iran’s bargaining position. A more disturbing possibility is that Iran’s ruler is setting the precedent for disregarding a deal sometime after it is concluded and after the regime pockets the tens of billions of dollars in immediate financial relief it could receive.

Whatever the case, the Obama administration must resist the temptation to respond with eleventh-hour concessions. On the contrary, the compromises already struck in the preliminary accord make it essential that the United States insist on terms for inspections and timed sanctions relief that cross the Khamenei lines.

In its essence, the agreement would place an enormous bet that Iran will moderate its ambitions and lose its taste for nuclear weapons over the next decade. In exchange for restraining its enrichment and other nuclear work for 10 to 15 years, Iran would gain the lifting of almost all international sanctions, providing it with a revenue stream it could use to escalate the wars it is fighting or sponsoring around the Middle East. When the accord lapsed, Iran would immediately become a nuclear threshold state, with a breakout time “almost down to zero,” as President Obama put it.

For that risky bargain to be worthwhile, the United States and its partners must at the least ensure that Iran will respect the decade-long moratorium and will not secretly pursue a bomb, as it has in the past. That means that international inspectors must have the right to visit any suspicious sites quickly, including on military bases. It was at the Parchin military base that Iran was believed to have carried out work on military warheads, and U.N. investigators seeking to visit the site have been stonewalled for nine years. It’s essential that some sanctions relief be linked to the completion of their investigation of Iran’s past weaponization work so that there will be a baseline for judging future Iranian compliance.

Throughout the Iran negotiations, Mr. Obama has insisted that he is ready to walk away rather than accept a bad deal. In light of the Khamenei speech, the White House must be ready to act on that threat.