JERUSALEM — His army nickname was Benny Huta, a Hebrew pun that translates as “Benny Chill.” And in his first-ever run for office, Benny Gantz never let anyone see him sweat, no matter the live-television gaffes, embarrassing leaks or rumors about personal improprieties that occasionally tripped up his candidacy for prime minister.

His centrist, flag-hued Blue and White party did better than any new Israeli faction ever had before, earning more than a million votes and around 35 seats in Parliament on Tuesday. That was the same as Prime Minister Benjamin Netanyahu’s Likud party did, though smaller right-wing factions tilted the election sharply to the incumbent.

It was quite a showing after just a few months in politics. Now, Mr. Gantz, a three-star general and former Israeli military chief, is laying in for a siege against Mr. Netanyahu that his allies expect could last into 2020.

“Nothing will drive us from our goal,” Mr. Gantz said Wednesday night.

With Mr. Netanyahu expected to form the most right-wing and ultra-Orthodox government Israel has ever seen, it will probably be a bumpy road even before a coalition is formed.