Isaac Herzog was getting nervous about the traffic as his car crawled north out of Tel Aviv, on the campaign trail, so he instructed his driver to use the “tchakalaka” — the deep, hornlike siren that Prime Minister Benjamin Netanyahu’s convoy regularly employs to clear the way.

Until a few weeks ago, Herzog, 54, the leader of the opposition, was considered by many Israelis to be a shrewd and able politician, but not quite prime ministerial material. The son of a storied family and a lawyer who served in previous governments as a minister of housing, social welfare and tourism, he was seen as lacking the charisma and machismo many here consider vital characteristics for a commanding leader who can protect Israel’s interests.

But as Tuesday’s elections approach, Herzog, the leader of the Labor Party and co-founder, with Tzipi Livni, of a new center-left slate called the Zionist Union, is posing a credible challenge to Netanyahu of the conservative Likud Party. Israeli analysts say this election is not really a contest between Netanyahu and Herzog in the classic sense of who constitutes the most attractive candidate. Instead, they say, it is essentially a referendum on Netanyahu, with Herzog, popularly known as Bougie, as a kind of default candidate.

“If you put up a cactus it would win some seats against Netanyahu because there are people who are just fed up with him,” said Yoaz Hendel, a former communications director for Netanyahu.

Still, Hendel said, Herzog is “a positive man with a positive image.” Given the polls, Hendel said, Herzog “must be doing something right. It could even lead him to become prime minister.”

And Herzog has clearly been working on his assertiveness.

By both rejecting his image as a nerdy, unimposing figure with a boyish face and high-pitched voice, and at times wryly embracing it, Herzog has surprised his supporters and detractors by maneuvering himself into position as a realistic contender for the post of prime minister.

Rafi Smith, a leading pollster, said that given Israel’s complicated system of coalition politics, the outcome is impossible to forecast. But three months after Netanyahu called the early ballot, apparently confident of winning a third consecutive term against a weakened array of foes, analysts say the race has become unexpectedly open.

“People have tended to underestimate me time and time again, for many reasons,” Herzog said, citing his reputation for politeness and being “less rough” than the typical Israeli politician. “But I’ve shown success in everything I’ve done.”

As the Labor leader, Herzog was expected to play up Netanyahu’s failures to address socioeconomic issues like the high cost of living and the lack of affordable housing. More counter-intuitively, he also has taken on Netanyahu’s long-hallowed image as “Mr. Security,” a one-man bulwark against the threats facing Israel.

“Netanyahu has eroded some of our deterrence factors,” Herzog said. 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,” Herzog said. “The fact is that over the last year Iran has turned into a nuclear threshold state.”

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 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 Netanyahu, given the disillusionment among traditional Likud supporters, said Ari Shavit, a columnist for the Haaretz newspaper.

“The great sin of the Israeli center-left,” Shavit said, “is that it did not produce a towering figure in decades.” But he said that Herzog’s fusion with Livni, the former justice minister and chief negotiator with the Palestinians, had suddenly created an alternative.

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.

The antithesis of a magnetic figure, Herzog doesn’t arouse strong emotions. “My strength is my EQ” — emotional intelligence, he said.

A turning point came when he was elected to take the helm of the Labor Party in 2013. He began making increasingly assertive speeches before the Knesset, or parliament, attacking Netanyahu.

The challenge, he said, was that the Israeli ­public did not know him well enough.

So for weeks, Herzog has been crossing the country interacting with citizens at town hall-style meetings, in the markets and in factories.

Herzog said that his role model was Levi Eshkol, Israel’s third prime minister, from 1963 until his death in 1969. Though relatively unsung, Eshkol prepared Israel for its victory in the 1967 war and abolished military law for Israel’s Arab citizens.

“He was a leader who perhaps didn’t have the voice or the looks,” Herzog said, “but he was a great decisionmaker. That’s what I want to be.”