Netanyahu, accompanied by Defense Minister Ehud Barak, at right, tours Hatzerim air base Tuesday.(Uriel Sinai/Getty Images)

A funny thing happened on the way to Benjamin Netanyahu’s predicted implosion as prime minister: he rebounded. According to a recent Israeli opinion poll, the man who couldn’t win enough votes to become prime minister without backroom coalition bartering is doing better than everyone expected. With a general approval rating of 49 percent, which is high by Israeli standards, Netanyahu has, in the first six months of his second administration, definitively outstripped all other would-be challengers, including his big rival, Tzipi Livni, whose Kadima party performed better than Netanyahu’s Likud in February’s election.

Netanyahu’s surer hold on power is due in large part to savvy political instincts. As he admitted in private discussion with colleagues recently, reported by Haaretz, his July speech at Bar-Ilan University, in which he for the first time consented to Palestinian statehood, cooled somewhat the domestic media’s hatred of him. But Bibi’s boom is also related to a more ephemeral political phenomenon: luck.

For starters, the ongoing legal woes of his controversial foreign minister, Avigdor Lieberman, who looks set to resign any day, have only consolidated Netanyahu’s singular influence in a top-heavy and overloaded cabinet. Second, the recent turmoil in Iran helped legitimize a perennial pessimist who’s been saying for years that Islamist governments can’t be negotiated with. And perhaps most impressively, Netanyahu has benefited from taking on Barack Obama—perhaps the only politician in the world of whom this could be said.

Netanyahu’s skills as a political tactician have improved greatly in the last decade. Indeed, understanding the unlikely successes of his second term requires knowing a little about the failures of his first.

Originally elected in 1996, half a year after Yitzhak Rabin’s assassination, Netanyahu was never fully embraced by a constituency still reeling from the late failure of dovish hopes. Back then, “he was lucky to be elected,” said Jerusalem Post pundit Shmuel Rosner. “He was never accepted by elites who thought he was just this young, hawkish guy who stole the election from Shimon Peres. He never got the legitimacy he needed, either from the Israeli people or from the Clinton administration.” According to Noah Pollak, a blogger on the Middle East for Commentary, who’s regularly in touch with officials in the prime minister’s office, Netanyahu was seen back then as an “impediment to the peace process, the naysayer,” running against an enormous tide of sympathy for reconciliation with the Arabs. As such, he was someone whom Bill Clinton—always perceived as a friend to the Jewish state—could easily undercut by appealing directly to the Israeli people. Netanyahu’s response was to buckle to U.S. pressure, making concessions to the Palestinians that he had vowed during the campaign never to make, such as withdrawing from 80 percent of Hebron in 1997, and signing the Wye River Memorandum in 1998, which outlined further withdrawals. Both of these gestures alienated Netanyahu’s allies on the far right and cost him reelection in 1999. As Boston Globe columnist Jeff Jacoby wrote at the time, “the would-be Israeli Churchill began to morph into a Chamberlain.”

Other neophyte mistakes, too, complicated Netanyahu’s maiden effort at governing. Matt Silver, a communications professor at the Academic College of Emek Yezreel, remembers vividly the unsuccessful assassination attempt of Hamas leader Khalid Meshaal in 1997, which Silver viewed then as Netanyahu’s attempted macho rite of passage gone awry. “One journal called him a ‘mysterious bungler,’” Silver recalled. “He had to prove himself, that he wasn’t this Johnny-come-lately, [that] he was a real Israeli.”

No longer. According to Sherman and Rosner, Netanyahu has learned from serving in subordinate roles in government in the past decade. His tenure as both foreign minister and finance minister under Ariel Sharon, many long-time observers of his career argue, taught him the value of compromise and alliance-building—what his critics in the Israeli press, including Nahum Barnea, the influential reporter for Yedioth Aronoth, call “opportunism.” To Rosner, however, it was telling that this time around, Netanyahu reached out to the Labor Party, which received only 13 seats in the Knesset in the last election, when he could have simply forged a narrow right-wing coalition government. Retaining as defense minister Ehud Barak, with whom Netanyahu served in the same IDF unit and is said to get along with well personally, was also savvy. “He learned this from Sharon,” said Rosner. “Bibi never liked Sharon, never trusted him, but he learned from his achievements.”

And in the confrontation with the White House over settlement expansion in the West Bank—the starkest challenge Netanyahu has faced so far—Netanyahu has astonishingly emerged less scathed than Obama. Unlike in 1996, the U.S. gambit of taking the case straight to the Israeli people has backfired, Rosner and Pollak said, with Israelis siding with Netanyahu over an even more internationally admired Democratic president. (Since announcing the settlement freeze, Obama’s approval rating in Israel, according to a Jerusalem Post-sponsored Smith Research poll, has dropped from 31 percent to six percent.)

“Obama began exactly where Clinton left off—at Camp David,” Pollak said. “He tried to weaken Bibi politically by making the Israeli public fear a crisis in the relationship with the U.S. But Obama, unlike Clinton, was elected with the baggage of Jeremiah Wright, Rashid Khalidi, and Bill Ayers—these were strikes against him in Israel. He compounded them by giving his first interview to Al Arabiya, and making his first two big speeches in Arab Muslim venues, Turkey and Cairo.”

Pollak suggests that Obama should have tried to cultivate a stronger rapport with the Israeli street before attempting any “arm-twisting.” Furthermore, halting construction in settlements that will likely go to Israel in any prospective peace agreement—particularly the East Jerusalem suburb of Ma’ale Adumin, which has 30,000 residents—is not nearly the cause célèbre in Jerusalem that it is in Washington. “There is no way you can have an agreement with Israel on a settlement freeze that would be meaningful,” said Barnea, who thinks Obama should have simply called for a freeze, which would have made Netanyahu sweat, but not tried to negotiate the details of one, which Israel can’t do, “legally or politically.” Negotiating the freeze “didn’t benefit Bibi,” Barnea added, “it damaged the Obama administration, and made it look ineffective in the eyes of the Arabs.”

Although Netanyahu has dismantled more outposts and roadblocks in the West Bank than did his predecessor Ehud Olmert, and vowed to double the number of Israeli inspectors of settlement construction, these seeming capitulations to White House demands have been carried out with little or no publicity.  According to Pollak, that’s the price of being a pariah prime minister—not receiving credit for aiding Palestinians—but so far, at least, Netanyahu’s coalition hasn’t rebelled against him again for these concessions.

Additionally, an unforeseen international crisis has tacitly bolstered Netanyahu’s credibility. Ayatollah Khameini’s ultra-violent reaction to protests in Iran, following the contested reelection of President Mahmoud Ahmadinejad, also appeared to justify what Israel’s most recognizable national security hardliner has been saying for years: that the mullahs can’t be trusted. Yet Netanyahu has not sought to take credit for being proven right. According to Daniel Seaman, director of the Israeli Government Press Office, Netanyahu’s reticence was strategic. “There’s an old Hebrew saying, ‘The work of the righteous is done by others.’ To people, it’s clear where Bibi stood on this issue. If he starts saying something about it, there’s going to be an opposition. This way, he gets all the benefits out of being right without claiming to be, and the opposition isn’t emboldened.”

Finally, Avigdor Lieberman, the far-right nationalist head of the Yisrael Beiteinu party, whom Netanyahu appointed foreign minister much to the chagrin of liberals at home and abroad, is facing a likely indictment for corruption charges, and may soon be a headache no more. Lieberman has promised to resign if he’s indicted, and a source in the prime minister’s office said that in that likely scenario, Netanyahu will keep the position vacant. “He can say he’s leaving it open to Lieberman until he’s exonerated, or leave it open to entice Kadima,” the source said. According to this theory, Netanyahu will run the foreign ministry alongside Barak—longtime chum of Hillary Clinton and Israeli’s preferred diplomat to the United States and Western Europe—and Danny Ayalon, the current deputy foreign minister, who represents the gentler face of Yisrael Beiteinu. As a troika, these men have all along been crafting Israel’s foreign policy without the help or input of Lieberman, who’s been there as a salve to his base. In fact, already “Lieberman is foreign minister in name only,” said Rosner.

Of course, Netanyahu’s fortunes may soon turn again. “Public opinion here, like in the states, is very flexible and exposed to mood,” said Barnea. “Bibi is lucky because, temporarily, the day-to-day security is basically good. Since the end of Operation Gaza, we don’t have any rockets, any terrorist attacks inside Israel. It’s springtime for the government.”

Barnea is quick to point out that this is only the beginning of a tenuous coalition; what’s more, it’s the summer, when as many as 400,000 Israelis (roughly 10 percent of the population) are vacationing abroad in Turkey, Europe, or the United States. “The feeling is that the country is on hold, in a way,” said Barnea, who, in covering Fatah’s sixth general assembly in Bethlehem, said the only thing people he interviewed wanted to talk about was food. “There’s no political news, only criminal. So let’s talk about the murder of a homosexual in Tel Aviv, or the murder of a baby by a father who wants to revenge his wife. If this is Bibi’s luck, OK. I call it August.”

Nevertheless, a rosier picture has thus emerged of Netanyahu’s prospects than anyone last February would have painted. “The day after Bibi formed his government, people were giving it a year at most,” said Silver. “Now it’s two or three years.”