Unlike many authors of his obituaries this week, I did not know Shimon Peres. I met him briefly a couple of times, where I heard him extol the virtues of being a dreamer and admired the way he was able to churn out pithy and poignant aphorisms, but I don’t have any personal stories about him or particularly meaningful encounters to relate. Nevertheless, I have always found him inspiring because he is the personification of one of the most important lessons for being successful in life, which is how to overcome failure.

Shimon Peres was good at many things, but his chosen profession was not one of them. Unlike many of Israel’s founding fathers, he did not have an illustrious or decorated military career and chose much earlier to go the political route, but he was, at best, a middling politician. He failed in his early jousts with Yitzhak Rabin to become party leader of HaMa’arakh (Labor’s predecessor), only succeeding in taking over the party when Rabin had to resign as prime minister and party leader because of his wife’s foreign bank account. He then immediately presided over his party’s first electoral defeat in Israel’s existence following 29 years of uninterrupted rule, losing to Menachem Begin and Likud in 1977 and setting off a new era of rightwing dominance that continues to this day. He lost the next election in 1981 as well, and finally won an election in 1984 only to fail at putting together a coalition and being forced into a power sharing arrangement with Likud and Yitzhak Shamir in which they rotated the offices of prime minister and foreign minister. When Peres lost the 1988 election, he agreed to form a unity government with Shamir once again, but without being able to extract the same concession for a prime ministerial rotation that Shamir had been able to extract from him. After Rabin’s tragic assassination, Peres served as acting prime minister for seven months until he promptly lost the first post-Rabin election to Bibi Netanyahu, an election that arguably should not have even been close but was lost partially as a result of Peres’s poor political instincts. The next time he ran for office was in 2000 when he stood for president, an election in the Knesset that everyone predicted he would win handily but which he lost to the undistinguished future convicted felon Moshe Katzav, thereby becoming both the first candidate for prime minister and the first candidate for president to ever lose to a Likud opponent. Peres won the presidency in 2007 on his second try, marking his first unambiguous electoral victory for high national office, although it was not an embrace from Israeli voters but one from the 120 Knesset members who vote for president.

Why am I inconsiderately recounting this embarrassing history of the last member of the state’s founding generation before he has even been buried? Because to me, the greatness of Shimon Peres stems precisely from this embarrassing history. Peres is being feted as an Israeli hero, as someone who was responsible for more Israeli military and diplomatic achievements than any other figure, as the high prophet of Israeli technology and ingenuity, and as the ultimate striver to realize his otherworldly vision of Israel at peace with its Palestinian neighbor. Yet, Peres never won an outright election to be prime minister. He was not, until his last decade, truly loved or embraced by the Israeli public. He was continually overshadowed by his rival Rabin. But rather than become the Adlai Stevenson of Israel, he became the Shimon Peres of Israel. He understood that failure was something that you overcome rather than something that defines you. He took whatever situation he was in and elevated it to something sublime and heretofore unimaginable. Has there ever been a more tireless or successful foreign minister? Is there anyone else who could have taken the completely ceremonial and entirely ignored position of Israeli president and transformed it into the bully pulpit and clarion voice of moral order that it has now become? By all rights, Peres should have disappeared from Israel’s political scene decades ago, yet the more time went on and the more electoral losses he racked up, the more influential and visionary he became.

Peres did not only rebound from failures. Equally important, he learned from them, and did not allow them to constrict him going forward. Many will note in the coming days the contradictions of Shimon Peres and his legacy; how he was derided by the military establishment despite being the most important figure in Israel’s acquisition of military assets and weapons in the state’s first decade and the godfather of its nuclear arsenal, or how he was lauded as a peacemaker despite being an early and effective champion of settlements, or how the world sees him as the face of Israel despite his being a non-sabra, suit wearing, European accented Hebrew speaker. But these contradictions were another key to his success, because when he was wrong or when something did not work, he was able to pivot and embrace something else. It is true that he was a hawk for most of his life, but he was a dove when it mattered. It is true that he encouraged the settlement enterprise and protected settlements as defense minister, but he was able to see how that policy would lead to Israel’s destruction and came to advocate for a Palestinian state. It is true that he spent years championing the concept of economic peace, but he eventually saw that it would never be sufficient without addressing the political aspect as well. Peres will go down as one of history’s greatest dreamers, but he was able to dream big because he was willing to stand on the rubble of his own previous failures of imagination.

The last giant of Israel’s founding generation is now gone. Shimon Peres’s death marks a new era for the Jewish state, whether Israel is ready for it or not. Peres’s death leaves a gaping hole and his legacy is overwhelming. May his memory be for an eternal blessing, and may Israel always embrace his ethos of never giving in to failure, elevating the mundane into the lofty, and constantly pushing against the limits of what appears possible.