Minutes released Sunday by the Israel State Archive revealed details of tense and nearly failed meetings between then-prime minister Menachem Begin and former US president Jimmy Carter during the latter’s visit to the country in 1979, as the two leaders tried to hammer out the last details of the Israel-Egypt peace treaty.

Carter had come to the meetings with the mindset that it was now or never for a peace agreement and at one point told Begin that he expected him to sign the proposed treaty despite the Israeli prime minister’s objection to some of the details.

“Mr President, we shall sign only what we agree to, and we shall not sign anything to which we do not agree,” Begin replied stubbornly. Negotiations continued and finally led to the signing of the peace treaty and the famous “triple handshake” between Begin, Egyptian president Anwar Sadat and Carter on March 26, 1979, in Washington.

The minutes were made public on Sunday ahead of the visit later this week by US President Barack Obama.

The dramatic events of March 1979 unfolded as Carter followed up the success of the Camp David Accords signed six months earlier by visiting the two countries to bring about a final treaty. The Camp David agreement, signed on September 17, 1978, laid down the framework for a formal peace treaty between Israel and Egypt. However, in the months that followed, negotiations came to a standstill, prompting Carter to visit and attempt to bring his influence to bear on the two sides. Carter arrived in Israel on March 10, 1979, after first visiting president Sadat in Egypt.

In their first meeting he informed Begin that Egypt demanded the presence of an Egyptian delegation in the coastal Gaza Strip, a request that took Begin by surprise as it had not been included in the Camp David agreement. The Israeli leadership feared that Egyptian presence in the Strip would stir up the Palestinians and lead them to demand independence. Carter also demanded that Israel publish a timetable for its withdrawal from the Sinai Peninsula, a stipulation that enraged Begin.

“We are to decide today on stages of withdrawal?” an agitated Begin asked later that day at a Cabinet meeting convened to review his progress with Carter. “I must admit, I know how to keep calm, and I have proved that today. This makes my blood boil. To confront us today with such a demand? A need to fulfill the whimsy of Sadat or the Americans — this is why we have to accept this? Certainly not. To do this would mean defeat in the fullest sense of the word.”

“We mustn’t permit a single Egyptian to handle the residents of Gaza. To do so would be to recognize Egyptian claims to it,” Begin declared. “They will turn the Gaza Strip into a volcano. Those are the instructions and that is how they are talking, the first step to Palestinian independence.”

Former prime minister Ariel Sharon, at the time the agriculture minister, argued that Israel should refuse to even discuss the issue.

“It would mean a Palestinian state next month,” he warned. “You don’t know the Gaza Strip. No matter what the price — this cannot happen, ever!”

Begin made it clear that he would not compromise on critical issues, even if it meant calling off the agreement.

“If he [Sadat] is willing to say that if such and such happens then there won’t be an agreement, then we can say that too, and I am worry-free,” he said. “I want this peace with all my heart, and wish to sign this peace agreement according to the terms we discussed together.”

Despite holding another meeting the next day with the Israeli Cabinet, Carter eventually left empty-handed. However, negotiations continued with US representatives that finally produced a workable treaty. Israel agreed and in a historic phone call, Begin informed Carter that Israel was ready to sign.

“That is the best news of my life — wonderful news,” Carter said.

The final treaty was signed at the end of that month in Washington and has remained largely unchanged ever since.