In today’s centrist climate, Mr. Khatami made no promises and offered no vision. What he advocated was a strategy: Every name on both lists, he had to repeat, because the lists included some unsavory characters, like the former intelligence minister Mohammad Reyshahri, popularly known as “the scary ayatollah” and associated with political executions in the 1980s. But voting for everyone on both lists, reformist and centrist political operatives had determined, was the best and probably the only way to defeat the hardest of the hard-liners who obstructed Mr. Rouhani’s agenda.

The defeat of these hard-liners, some of them closely associated with the supreme leader, was a rebuke to those who stood in the way of the nuclear deal, tarred the allies of the popular president as foreign stooges and promised to block foreign investment in the newly opening economy. For the first time in at least eight years, the Parliament will be substantially new, with neither a clear majority nor fixed partisan lines.

This election was not a victory for reform. Reform was not on the ballot, though some reformists were. Even if every one of them prevailed, they could not produce visionary change as a minority in Parliament. But by ticking off “every name on the list,” pro-reform voters effectively opened a bottleneck. Like the election that brought Mr. Rouhani to the presidency in 2013, this vote was a victory for pragmatism — as a political faction, but more significantly as a frame of mind.

Mahmoud Ahmadinejad, a pugnacious hard-liner, succeeded Mr. Khatami as president. The contrast between them appears to illustrate the extremities possible under Iran’s Islamic Republic, even though Mr. Khatami’s reformists were nobody’s extremists. They advocated an incremental process of internal change — evolution, not revolution, they liked to say, toward greater pluralism in thought, politics and even religion.

But their vision challenged the hard-liners’ strongly held beliefs about the fundamental nature of the Islamic state. For this reason, among others, the reformist project ran up against the security establishment. Under Mr. Ahmadinejad, particularly in his second term, Iran was governed with a heavy, forceful hand by a faction more in harmony with the security services and in open conflict with civil society. Both presidencies were defined by a zero-sum contest for political survival.