Secretary of State John F. Kerry speaks at the State Department. (Andrew Harnik/Associated Press)

THE OBAMA administration is ending eight years of failed Middle East diplomacy exactly where it began in 2009 — with an exaggerated and misguided focus on Israeli settlement construction. As he railed at the continuing growth of West Bank Jewish housing on Wednesday with a prolixity that Fidel Castro would have admired, Secretary of State John F. Kerry sounded a lot like President Obama during the early months of his first term, when he insisted that the Israeli government freeze all construction as a starting point for negotiations on a Palestinian state. The president’s demand had the effect of encouraging Palestinian leaders to resist all concessions while seeking to delegitimize Israel internationally; the peace talks went nowhere even when Prime Minister Benjamin Netanyahu imposed a temporary construction freeze.

Mr. Kerry’s speech was, above all, a vivid demonstration of the administration’s inability to learn from its mistakes or adjust the ideological tenets that Mr. Obama brought to office. If it has an effect, it will be to do more damage to the “two-state solution” that Mr. Kerry claimed to be defending. His histrionic rhetoric about “cementing an irreversible one-state reality” will be welcomed by extremists among both Israelis and Palestinians, who are eager to declare the two-state option dead. The one-staters include members of the incoming Trump administration, which appears headed toward flipping U.S. policy to the opposite extreme, of cheerleading for settlements — a position that would be no less blinkered and self-defeating than Mr. Obama’s.

In fact, the two-state solution remains entirely viable, as even the settlement statistics cited by Mr. Kerry demonstrate. The administration asserts that the Jewish population in the West Bank has increased by 100,000 since 2009 — but by Mr. Kerry’s account, 80 percent of that growth was in areas Israel would likely annex in any settlement. In eight years, 20,000 people have been added to communities in territory likely to become part of Palestine — an area where 2.75 million Arabs now live. That growth of about 3 percent per annum, the product of a restraint for which Mr. Netanyahu received no White House credit, means that the Jewish population outside Israel’s West Bank fence may have decreased as a percentage of the overall population even as Mr. Obama and Mr. Kerry have made it the focal point of U.S. policy.

What blocks the two-state solution is not demography, but a failure of leadership among Israelis and Palestinians. Palestinian President Mahmoud Abbas walked away from a generous Israeli statehood offer eight years ago and in 2014 refused to accept the framework for a settlement that Mr. Kerry outlined on Wednesday. Though he has endorsed two states, Mr. Netanyahu has been unwilling to stand up to nationalists to his right.

It’s unlikely that Israeli and Palestinian leaders who are willing and able to reach agreement will emerge in the near future. That’s why the best U.S. policy would be to work to preserve the option of Palestinian statehood for the longer term, by combating Palestinian corruption and political dysfunction and by encouraging Israel to facilitate the growth of a viable West Bank economy. A new U.S. administration could also work to strike a deal on settlements that restricted all growth to areas that would not be part of a Palestinian state. That would require the sort of pragmatic clear-headedness that for eight years eluded the Obama administration.