Shimon Peres, one of the last surviving pillars of Israel’s founding generation, who did more than anyone to build up his country’s formidable military, then worked as hard to establish a lasting peace with Israel’s Arab neighbors, died Wednesday in a Tel Aviv area hospital. He was 93.

His death was announced by his son Nehemya Peres, who is known as Chemi, and his personal physician and son-in-law Dr. Rafi Walden, outside the Sheba Medical Center, where he had been hospitalized for the last two weeks.

Peres died just over two weeks after suffering a stroke. Doctors kept him largely unconscious and on a breathing tube since then in hopes that it would give his brain a chance to heal. But he deteriorated as the nation he once led watched his last battle play out publicly and leaders from around the world sent wishes for his recovery.

As prime minister (twice); as minister of defense, foreign affairs, finance and transportation; and, until 2014, as president, Peres never left the public stage during Israel’s seven decades.

He led the creation of Israel’s defense industry, negotiated key arms deals with France and Germany and was the prime mover behind the development of Israel’s nuclear weapons. But he was consistent in his search for an accommodation with the Arab world, a search that in recent years left him orphaned as Israeli society lost interest, especially after the upheavals of the 2011 Arab Spring led to tumult on its borders.

Chosen by Parliament in 2007 to serve a seven-year term as president, Peres had complicated relations with the hawkish government of Prime Minister Benjamin Netanyahu, elected in 2009. While largely a ceremonial post, the presidency afforded Peres a perch with access and public attention, and he tried to exert his influence.

For someone who was dogged for decades by a reputation for vanity and backroom dealing, Peres ended his years in public office as a remarkably beloved figure, promoting the country’s high-tech prowess and cultural reach, a founding pioneer who set an example for forward thinking.

Never at a loss for a bon mot in his Polish-accented Hebrew, English and French, Peres said of his transformation: “For 60 years, I was the most controversial figure in the country, and suddenly I’m the most popular man in the land. Truth be told, I don’t know when I was happier, then or now.”

In his efforts to help Israel find acceptance in a hostile region, Peres’ biggest breakthrough came in 1993 when he worked out a plan with the Palestine Liberation Organization for self-government in Gaza and in part of the West Bank, both of which were occupied by Israel.

After months of secret negotiation with representatives of the PLO, conducted with the help of Norwegian diplomats and intellectuals, Peres persuaded his old political rival Yitzhak Rabin, then the prime minister, to accept the plan, which became known as the Oslo Accords.

Peres, who was serving as foreign minister, signed the accords on Sept. 13, 1993, in a ceremony on the South Lawn of the White House as Rabin and their old enemy Yasser Arafat, the chairman of the PLO, looked on and, with some prodding by President Bill Clinton, shook hands.

It was a gesture both unprecedented and historic. Up to that time, Israel had refused to negotiate directly with the PLO. Peres broke the taboo, and the impasse.

“What we are doing today is more than signing an agreement; it is a revolution,” he said at the ceremony. “Yesterday a dream, today a commitment.”

Peres, Rabin and Arafat were awarded the Nobel Peace Prize in 1994.

But the era of good feelings did not last. It was shattered in 2000 after a visit by the opposition leader Ariel Sharon to the sacred plaza in Jerusalem known to Jews as the Temple Mount and to Muslims as the Noble Sanctuary. The next day, the Israeli police fired on stone-throwing protesters, inaugurating a new round of violence that became known as the second intifada.

It did not end until Arafat died in 2004, bringing new leadership to the Palestinians and a new effort at coexistence led by Sharon, a former hawk who was elected prime minister and withdrew Israeli settlers and soldiers from Gaza and small parts of the West Bank.

A man of medium height and slender, athletic build — his dark hair turned gray and then white in his later years — Peres always exuded vitality, despite a schedule that kept him going 18 hours a day. When, on his 88th birthday, he was offered a traditional Jewish greeting, “May you live till 120,” he retorted without missing a beat, “Don’t be stingy.”

Peres was married to the former Sonya Gelman, who shunned the spotlight to the point of refusing to move into the president’s house when he took his last public post. She died in January 2011. They had three children: a daughter, Zvia, and two sons, Jonathan and Nehemya. They and Peres’ eight grandchildren and three great-grandchildren survive him.

Peres was an effective speaker, comfortable in front of large audiences as well as the television camera. He cultivated party members — remembering their names and attending their weddings and bar mitzvahs — and nurtured his relationship with the intelligentsia.

He also wrote poetry and was given to quoting the ancient Greeks and Flaubert and Churchill. He published a dozen books, including “The New Middle East,” in 1993, and “Battling for Peace,” a memoir, in 1995. His last book was an affectionate political biography of his mentor, the country’s founding prime minister, David Ben-Gurion.

Peres was born Shimon Persky on Aug. 16, 1923, in the small village of Vishniewa, Poland, to a merchant family. His parents, Yitzhak and Sara Persky, took him to Palestine when he was 11, where he studied in Tel Aviv and then entered an agricultural school.

In 1941, he helped found Kibbutz Alumot in the eastern Lower Galilee, where he worked as a herdsman and was elected kibbutz secretary. He soon became active in the Mapai, which was to become Israel’s Labor Party, and, at 18, was appointed the coordinator of the youth movement of the Histadrut, the General Labor Federation.

He rose rapidly, getting experience in the intricacies of Israeli political life. In 1944, Ben-Gurion, then the head of the Jewish Agency for Palestine, sent Peres with a small reconnaissance group to Eilat on the Red Sea to survey the Sinai Desert and make maps that became important strategic assets during the 1948 war of independence.

It was on that mission that a friend sighted a nest of eagles, “peres” in Hebrew. “Persky,” he said, “why don’t you change your family name to Peres?” He accepted the suggestion, though, in fact, the bird they saw was more a vulture than an eagle.

When Israel became independent in 1948, Peres was named head of the naval service. Within two years, he was sent to the United States to lead a defense supply mission in New York. He was 27 and spoke no English, but within three months, after rounds of intensive private lessons, he was fluent. He took courses at the New School for Social Research and New York University, and later at the Harvard School of Public Administration.

In 1951, Ben-Gurion, then prime minister and minister of defense, appointed Peres director-general of the Defense Ministry, where he used his Harvard training to reorganize the department. Peres became known as one of “Ben-Gurion’s boys” — protégés of the “Old Man” — a group that included Teddy Kollek and Moshe Dayan.

Peres, who frequently drew on historical allusions, thought of himself as philosopher more than a politician. When asked about the 1993 Oslo Accords, he said: “There was no alternative. We had to do it.”

He added, “An ancient Greek philosopher was asked what is the difference between war and peace. ‘In war,’ he replied, ‘the old bury the young. In peace, the young bury the old.’ I felt that if I could make the world better for the young, that would be the greatest thing we can do.”