Ever since the state of Israel was created in 1948, Shimon Peres, who has died aged 93, was at or near the centre of action. A protege of David Ben-Gurion, Israel’s first prime minister, Peres became premier himself on three occasions, foreign minister for another three, and state president from 2007 until 2014. He fashioned alliances with France in the 1950s, and planted the seeds for Israel’s embryonic electronics and aircraft industries. During the 60s, he honed the Israel Defence Forces (IDF) and secretly amassed Israel’s nuclear weapons.

For 15 long years after it fell from power in 1977, Peres led the Labour party. In the early 80s, he resuscitated Israel’s economy, and in 1994 shared the Nobel prize for his role in the efforts to create peace in the Middle East through the Oslo accords. In the same year, he cemented Israel’s peace treaty with Jordan. Defeated at the polls in 1996, he returned in 2001 as foreign minister, thereby giving Israel’s controversial new premier, Ariel Sharon, a much-needed veneer of respectability. And in 2006, he left Labour, his home for five decades, to help Sharon set up his powerful new breakaway faction, Kadima.

A simple listing of achievements only hints at the phenomenon that was Peres. The Jerusalem Report news magazine called him “Israel’s only world-class statesman, perhaps Zionism’s last pragmatic visionary”. Peres wrote 11 books, read poetry voraciously, and could quote from Old Testament prophets, French literature and Chinese philosophy with equal ease. After the assassination of Yitzhak Rabin in 1995, he bound together a shattered nation.

And yet, despite all his talent, there was something tragic about the man. Peres contested five elections without winning a single outright victory. His longest tenure as premier was two years, and came while he was in an awkward alliance with his Likud enemies. He lost the Labour leadership on the eve of the party’s return to power in 1992. A slew of terrorist attacks in early 1996 allowed Binyamin Netanyahu victory over Peres in Israel’s first direct prime ministerial elections. No wonder Orly Azoulay titled her 1996 biography of him The Man Who Didn’t Know How to Win.

Some of his initiatives were halted before they had got going, such as his 1987 London agreement with King Hussein of Jordan. Others collapsed because opponents chipped away at the scaffolding, as with the Oslo accords. Even when in 2000 he stood for state president – the ultimate consolation prize for veterans – Knesset members opted not for him but for the pedestrian Moshe Katsav.

All the same, Peres campaigned well into his 80s. No sooner had the media written him off as a “serial loser” than he would pop up again as a saviour in a time of crisis. He was used to playing the long game. In 2007 Katsav resigned in disgrace amid charges of sexual improprieties, and Peres was elected president in his stead. Virtually across the board, Israeli editorials spoke of a national sigh of relief in recognition of a long-maligned yet irreplaceable figure.

“I am a child of the generation that lost one world and went on to build another,” Peres once wrote.

Son of Yitzhak and Sarah Persky (he later Hebraised the family surname), he was born in Vishneva, then a largely Jewish town located in the borderlands between modern Belarus, Poland and Lithuania. His New York-born cousin Betty Perske, one year his junior, went on to achieve fame as the actor Lauren Bacall. Shimon’s maternal grandfather, Zvi Meltzer, who later died in the Holocaust, inspired his love for literature. Frequent antisemitic raids undermined Vishneva’s patina of autonomy. At the age of 10, Shimon left to settle in Tel Aviv, where his father, a lumber merchant, had emigrated two years earlier.

At 15 Peres joined the Ben Shemen agricultural youth village, a crucible of future Israeli leaders. He soon met the Ukrainian-born Sonia Gelman and wooed her by moonlight with readings from Marx’s Das Kapital. The couple married in 1945 after Sonia had served as a nurse and driver with the British Army in Egypt. She became a source of strength to him in private and an enigmatically deferential figure in public.

Peres became leader of the Hano’ar Ha’oved (Working Youth) Zionist movement when he was 19, and founded Kibbutz Alumot in the Jordan Valley. Apprised of his skills, Ben-Gurion appointed Peres head of mobilisation for the Haganah underground in 1947. He procured plane parts from the US, Italy and Czechoslovakia during the 1948 war. He even became secretary of Israel’s navy, although he confessed: “My experience consisted of moderate proficiency at breaststroke and one childhood attempt to launch a raft off the coast of Tel Aviv.”

In 1950 Peres travelled to Washington as military attache. By 1953, aged 29, he was director of the entire defence ministry, an office he held until 1959. Peres helped plan the Sinai campaign of 1956. In 1957, he successfully lobbied the French government for a nuclear reactor, and established a hi-tech intelligence unit, Lakam, whose operatives served him in future clandestine ventures. He also tried to abolish military rule over Israel’s Arab citizens, but Ben-Gurion overruled him and the law was only repealed in 1966.

Israel later promised that it would not introduce atomic weapons into the region – “at my urging”, wrote Peres. Though he conceded that Arab leaders saw his creation, Israel’s secret Dimona plant in the Negev Desert, as “a worrisome fuzzy deterrent”, Peres the politician enjoyed creating such deliberate ambiguities.

In 1959 Peres was elected to the Israeli parliament, the Knesset, for the ruling Mapai party (forerunner of Labour) and immediately became deputy defence minister. He bought Israel’s first US weapons, but resigned in 1965 with the prime minister, Ben-Gurion. Their breakaway Rafi party proved unsuccessful, winning only 10 seats, and in 1968 Rafi rejoined Labour, as did Peres, who became its deputy general secretary.

Israel gained the Palestinian-populated territories of Gaza and the West Bank in the 1967 war – an acquisition that was to change its politics more profoundly than was realised at the time. In 1969 Peres was charged with developing these areas, and absorbing new eastern European immigrants. He then served in turn as communications, transport and information minister. When, in 1974, the prime minister, Golda Meir, was forced to resign, Peres gamely stood for election to the vacant post of party leader, but lost narrowly to an equally youthful, native-born military hero, Rabin. This was a battle that would be repeated often over the next two decades.

Appointed defence minister that June, Peres immediately plunged into the intricacies of negotiating a second interim Sinai treaty with Egypt. He also opened a “good fence” border crossing with Lebanon, revitalised the IDF after the near-humiliation of the 1973 war, allowed legally questionable settlements on the West Bank, and masterminded the daring rescue of hostages from Entebbe in 1976. Yet support haemorrhaged for a government blighted by scandal and economic malaise. Rabin resigned in April 1977 and Peres was prime minister for barely a month before Menachem Begin’s Likud demolished Labour at the polls.

Peres thus won the dubious privilege of becoming Labour’s first-ever opposition leader. He then saw Begin negotiate the historic peace agreement with Egypt that he had expected to make himself. Rabin’s memoirs decried Peres for betraying him in 1977, and Begin was able to exploit the spat to triumph at the 1981 polls. Peres meanwhile became a vice-president of the Socialist International in 1978. There he befriended Willy Brandt, Bruno Kreisky, British Labour politicians and delegates from Africa and Asia. Such ties were to prove invaluable.

Likud’s ill-fated Lebanese war of 1982 allowed Peres to tap into national unease. He fought the 1984 elections to a dead heat, and duly headed a national unity government, agreeing that he would hand power to Likud’s pugnacious new leader, Yitzhak Shamir, after two years. As prime minister, Peres made up for lost time. He withdrew troops from Beirut to a narrow “security zone” in southern Lebanon. Then he slashed Israel’s inflation rate from 450% to 16% by forcing the Histadrut labour confederation and big business into a national compact. When Shamir became prime minister, Peres served as foreign minister (1986-88), during which time the iconoclastic pragmatist and security hawk, who once called settlements “the roots and eyes of Israel”, blossomed into a peace campaigner.

He had first met King Hussein in 1974. Their mutual respect was clear from the outset. Peres felt that a Jordanian-Palestinian confederation could break the stalemate in the territories, and bring peace to Israel, and in 1987 negotiated with the king in London. Shamir, angry that Peres had “gone behind his back”, quashed the deal. The acrimony between them deepened, and probably exacerbated Palestinian frustration. For his part Hussein blamed Peres for leaking their secret talks.

Israel’s 1988 election took place against the backdrop of the Palestinian intifada (the uprising against Israel in the occupied territories). It ended in deadlock, and led to another unsatisfactory “unity government”. Peres rejected Shamir’s endorsement of settlements and, in 1990, sought to topple the government. At the last moment, the religious Shas party withdrew the support it had promised him. In early 1992, Rabin replaced Peres as party leader, and went on to win the June elections for Labour.

Miraculously, their enmity turned to partnership, with Peres, the foreign minister, as the engine and Rabin, the prime minister, as the gears and brakes (or so Peres later described it). A longtime foe of the Palestine Liberation Organisation, Peres now persuaded Rabin to consider talks with the PLO leader Yasser Arafat. Peres’s lieutenants, led by Yossi Beilin and Uri Savir, opened a secret track with PLO negotiators outside Oslo. At the subsequent White House lawn signing in September 1993, Peres nudged a reluctant Rabin to shake hands with Arafat – an image that went round the world.

For two years, Peres worked furiously to keep the imperfect peace on track. Given the problem of settlements, it was, he quipped, an attempt “to turn an omelette back into eggs”. He negotiated directly with Arafat, turned the “Gaza and Jericho First” proposals agreed at the White House into reality, drafted the 1994 Paris Protocol of Israeli-Palestinian economic relations, promoted regional summits and in 1995 sealed Oslo II (an agreement to restore Palestinian rule to six major West Bank towns). Rabin, meanwhile, concentrated on Syrian talks via his protege, the military chief of staff Ehud Barak.

But Israeli fury at persistent terrorism prompted demonstrations against the Rabin-Peres administration. In 1995, Yigal Amir assassinated Rabin at a peace rally. Peres, Amir’s other intended target, was just metres away. He took over as prime minister on a wave of sympathy. With hindsight, Peres’s decision not to call immediate elections was an error. Nonetheless, he achieved much in his six months in charge: he implemented Oslo II ahead of schedule, assuaged the religious right, bolstered the economy and co-operated with Arafat over the first-ever Palestinian elections.

Support for Peres evaporated when successive bomb attacks killed dozens in Tel Aviv and Jerusalem, and talks with Syria came to naught. Likud warned: “Peres will divide Jerusalem.” Arab states feared that his dream of a borderless Middle East spelled Israeli economic colonialism by stealth. Peres’s retaliatory invasion of Lebanon in April 1996 also misfired, when more than 100 refugees perished in one Israeli bombing. For all Peres’s Panglossian fantasies of a “new Middle East” the electorate narrowly yet decisively favoured Netanyahu that May.

Peres chided “Bibi” for “111 days of verbiage”, and held on as party chairman until Barak ousted him in 1997. After Labour’s victory in 1999, Barak gave Peres the nebulous portfolio of “regional co-operation minister”, but sidetracked him over the peace process. Peres had meanwhile founded a centre for peace in his name, with headquarters in Ajami, a largely Arab neighbourhood of Jaffa. It is dedicated to dialogue, cultural, economic and youth initiatives, and healthcare assistance to Palestinians.

In 1998 he wrote forewords to four books on the 50th anniversary of Israel’s independence. He also released For the Future of Israel, a series of philosophical conversations with the author Robert Littell. Where other Israeli politicians grudgingly accepted a Palestinian state as inevitable, only Peres argued in Le Monde that it was necessary for Israel’s future. When the new intifada broke out in 2000, polls backed Peres to restore the peace process. In the event, Barak sabotaged his rival’s “virtual candidacy”, only to lose at the polls himself. Peres emerged as foreign minister under Sharon in a Likud-Labour coalition government. This time Peres was the liberal brake to Sharon’s determinedly rightwing engine. Whether he was an effective brake was another story.

Although many Israeli leftists felt outraged at his “betrayal”, experienced Peres-watchers knew that his personal friendship with Sharon counted for more than ideological congruence. Less charitable souls felt that his overvaulting ambition had once again trumped his principles. Similar charges resurfaced in 2005, when he left Labour to co-found Kadima with Sharon, barely a month after losing the Labour leadership to an outside candidate, Amir Peretz. Peres served as Ehud Olmert’s deputy premier after Kadima convincingly won elections in 2006. The following year, by now Israel’s longest serving parliamentarian, he left the Knesset to contest the presidency.

As Israel’s ninth president, he helped restore his nation’s battered reputation. He became the first Israeli head of state to address a Muslim state legislature when he spoke to Turkey’s national assembly in November 2007. Turkey and Japan supported his “valley of peace initiative” for economic revival and joint industrial projects in the West Bank. In 2008 he launched the Israeli Presidential Conference, an annual brainstorming forum which attracted guests including George W Bush, Elie Wiesel, Robert De Niro, Rupert Murdoch and Bernard-Henri Lévy. In 2009 Peres served as “national host” for Pope Benedict XVI’s visit to Israel. At last he gained the affection of Oriental Jews – half of Israel’s population – who had once seen him as an Ashkenazi elitist.

Most unusually for an Israeli president, Peres became his nation’s top diplomat. He asked Palestinians and Arab nations to join in “a great journey towards a world built on logic and intellect, not land”. He negotiated directly with Mahmoud Abbas, president of the Palestinian Authority, on behalf of a taciturn Netanyahu. He placated President Barack Obama when Israeli actions offended the Oval Office. And in 2013 he delivered a video interview beamed from Jerusalem to a security summit in Abu Dhabi for 29 foreign ministers of Arab and Muslim countries. His honours included appointment as honorary GCMG in 2008, award of the US presidential medal of freedom in 2012 and the Congressional gold medal in 2014.

Nonetheless, Peres still engendered controversy. In his inaugural presidential speech he bluntly stated that Israel had to “get rid of the territories”. He averred that he had changed his position, not his beliefs. Although many hailed him as a man of vision and peace, Israeli rightists flayed him for playing into the hands of the PLO. Many Likud supporters resented the way he pushed his peace agenda while the foreign minister, Avigdor Lieberman, was persona non grata in most capitals. More than that, his stance seemed to contradict Netanyahu’s policies.

For their part, the Israeli left accused Peres of acting as a figleaf for an obdurate Likud administration. They were dismayed when in 2009 he defended Israel’s continuing attack on Gaza. Days later he found himself at the centre of an unseemly row with the Turkish prime minister Recep Tayyip Erdoğan at the Davos world economic summit as a result. Though Peres’s diplomatic intercession smoothed ruffled feathers, he still warned against a nuclear Iran “taking over the Middle East” and rejected the critical UN report into the Gaza war. Former liberal allies were perplexed when, that May, he proclaimed newly elected Likud premier Netanyahu a peace pioneer – an opinion he reversed in 2015 when he blamed Netanyahu (re-elected that year) for talking peace but doing nothing to implement it.

“Over the years,” wrote the Israeli historian Ze’ev Sternhell, “Shimon Peres … destroyed everything of value [in Labour].” Other leftists blamed him for initiating with Oslo II the settlement bypass roads that seemed to render a contiguous Palestinian state impossible. Peres repeatedly called Abbas a serious and true partner for peace, even admiring the courage, if not agreeing with the timing, of Abbas’s 2012 UN bid for Palestinian statehood. Yet many Palestinians blamed Peres for saddling them with inferior terms in the Paris economic deal of 1994. Now Israeli critics charged him with abusing the apolitical nature of the presidency.

After leaving the presidency in 2014, Peres continued work for his peace centre. When Israeli authorities denied the centre tax-exempt status because it trained doctors from Gaza, the centre suspended its application and continued with its programme, which by 2015 had helped 250 personnel. As late as November 2015, his health now failing, he insisted that Israel faced “eternal war” if there was no Palestinian state.

Peres was an intriguingly contradictory figure: a romantic in a cynical age, an Israeli icon with a Polish accent and francophone sensibility, who carried about him the taint (deserved or otherwise) of political chicanery. Unlike holiness, he told David Frost, politics is built on compromise. Nor was he above taking audacious decisions, as in 1989 when he ordered Mossad to abduct the nuclear whistleblower Mordechai Vanunu from British soil, or in 2002, when he attracted millions to invest in nanotechnology.

He certainly brought a touch of aesthetic philosophical discrimination to the world of politics. His books included The Next Step (1965), David’s Sling: The Arming of Israel (1970), Entebbe Diary (1991), The New Middle East (1993), Battling for Peace (1995), The Imaginary Voyage: With Herzl in Israel (2000) and Ben Gurion: A Political Life (2011). Among the numerous biographies of him are Matti Golan’s Road to Peace (1989) and Michael Bar-Zohar’s Shimon Peres (2013).

He is survived by his daughter, Zvia, sons, Yonathan and Nehemia, and six grandchildren.

• Shimon Peres, statesman, born 1 August 1923; died 28 September 2016.

• This article was amended on 28 September 2016. An earlier version said that Peres was survived by his wife, Sonia. She died in 2011.