“Netanyahu has eroded some of our deterrence factors,” Mr. Herzog said, speaking in fluent English. He pointed to the prime minister’s willingness to release Palestinian prisoners “with blood on their hands” and his failure to end last summer’s 50-day war against Hamas in Gaza with a diplomatic achievement, such as an international resolution for the demilitarization of the Palestinian territory.

“He spoke and spoke about Iran,” Mr. Herzog said. “The fact is that over the last year Iran has turned into a nuclear threshold state.”

Mr. Herzog is not making any grandiose promises about the chances of an accord with the Palestinians. He says only that if elected he will try to reignite the negotiating process and make a “100 percent effort.” He also pledges to rehabilitate Israel’s frayed ties with Washington.

Counting Mr. Netanyahu’s first term in office in the 1990s, a central slogan of the Zionist Union’s campaign has been, “Nine years of nothing.”

A strong challenger could have won earlier races against Mr. Netanyahu, given the disillusionment even among traditional Likud supporters, said Ari Shavit, a columnist for the liberal Haaretz newspaper who also spent time with Mr. Herzog on the road. “The great sin of the Israeli center-left,” Mr. Shavit said, “is that it did not produce a towering figure in decades.” But he said that Mr. Herzog’s fusion with Ms. Livni, the former justice minister and chief negotiator with the Palestinians, had worked like a chemical agent of change and had suddenly created an alternative.

Mr. Herzog is proud of his pedigree as the scion of the closest thing to Israeli aristocracy. His grandfather was the state’s first Ashkenazi chief rabbi, and his father, Chaim Herzog, was a soldier and diplomat who became Israel’s sixth president. His mother, Aura Herzog, founded the environmental group Council for a Beautiful Israel. An uncle, Abba Eban, is widely considered to have been Israel’s greatest orator.

Today, Mr. Herzog lives in the house where he grew up, in the Zahala neighborhood of Tel Aviv that was founded as a military quarter. He said that when he was a child his neighbors included Yitzhak Rabin, Ariel Sharon and Moshe Dayan.