In this March 26, 1979, file photo Egyptian President Anwar Sadat, left, U.S. President Jimmy Carter, center, and Israeli Prime Minister Menachem Begin clasp hands at the White House after signing the peace treaty between Egypt and Israel. Credit: Bob Daugherty | AP

Few presidents have been more different than Jimmy Carter and Donald Trump. One confessed in a Playboy interview that he had “looked on a lot of women with lust” and “committed adultery in my heart many times.” The other paid more than a quarter-million dollars in 2016 to hush up separate extramarital liaisons with a Playboy model and a porn actress.

Yet the men do share an unusual and little-remarked-upon trait: their proclivity for personalizing foreign policy.

Whether with allies or with adversaries such as North Korea, Russia and China, Trump has upended traditional notions of the president’s role in diplomacy. “To a degree not seen in earlier presidents, Trump seems to define his progress chiefly in whether he likes foreign leaders he meets — and they him,” the Los Angeles Times observed last year.

Diplomatic personalization manifested itself differently under Carter, who relied on forging connections to foster trust. But for both presidents, personalized diplomacy carried the same high stakes and risks. Personal presidential involvement in any foreign policy issue engages domestic political actors, focuses public opinion and shifts news coverage from diplomatic to political.

Nowhere was that more evident than in Carter’s signature achievement, the Camp David Accords, which turned 40 this week. Carter’s role in forging the agreement served as an extreme example of presidential personalization of foreign policy. As he discovered, bringing presidential prestige to bear on the negotiations granted greater credibility to American positions. But because the presidency is fundamentally a political office, Carter had a low tolerance for failure. Avoiding the appearance of failure risked becoming more important than achieving success.

The 1978 Camp David Summit represents the most extraordinary diplomatic sprint in presidential history. In a move either risky or reckless (or both), Carter invited Israeli Prime Minister Menachem Begin and Egyptian President Anwar Sadat to the mountaintop retreat for an open-ended summit. It ended up lasting 13 days.

Carter’s immersion in details was total. In the compound’s billiards room, he spread out a 15-by-22-foot map of the Sinai Peninsula and, on his knees, examined “every wadi and oasis in the region.” He shuttled back and forth between the leaders’ separate cabins, personally revising a text that went through 23 drafts. On two separate occasions, Carter pleaded with Sadat and Begin to continue negotiating by appealing to them on the basis of their personal relationship with him.

Carter’s effort stemmed from his supreme belief in his own powers of persuasion. Carter “always felt in foreign affairs that if he could only get his adversaries into the room with him, he could win them over,” observed James Fallows, his chief speechwriter from 1977 to 1979. “Carter’s faith was in himself, and in the impression he would create.” In Trump’s parlance, Carter saw himself as a deal-maker.

But the accords, although a massive achievement — the first-ever agreement between Israel and an Arab antagonist — provided only a framework, so the work didn’t end at Camp David. One part laid out terms for an Egypt-Israel peace treaty, pending further negotiations. The other part consisted of various steps meant to lead to autonomy for the Palestinians in the West Bank and Gaza Strip.

The summit gave way to a grinding process in which subordinates negotiated the finer points. This was dangerous for Carter, because those subordinates lacked the prestige he brought to the negotiations, but his own political fate had become intertwined with the outcome. “Win or lose, you are identified with this effort,” Press Secretary Jody Powell warned him.

Carter had hoped a full peace treaty would be concluded within days — in time to give Democrats a boost in the 1978 midterm elections. Instead, it took six months. That November, Democrats lost 15 House seats and three Senate seats. Carter’s own approval ratings barely rose.

The peace process, with which the administration hoped to showcase the president’s strength and dealmaking skills, hung around Carter’s neck like an albatross. The lack of a final treaty tapped into an emerging narrative: Carter was a nice man, but he lacked the resolve to be effective.

Negotiations between Egypt and Israel limped through early 1979. By March, national security adviser Zbigniew Brzezinski recalled, it had become evident that “unless Carter again injected himself personally and made another major effort,” there was no hope for an Egypt-Israel treaty.

So Carter made a last-minute dash to the Middle East to conclude the details in face-to-face talks with Begin and Sadat. It again carried risks. “Failure in personal presidential diplomacy,” Secretary of State Cyrus Vance fretted, “could have sapped the administration’s political strength” in other areas.

By the end of the six-day trip, Carter managed to secure Begin and Sadat’s agreement on a peace treaty, which was signed at the White House on March 26, 1979. Despite periodic strains, the treaty has held for 39 years.

But post-treaty negotiations on the other half of the accords — autonomy for Palestinians — proceeded without presidential involvement. Aware that the Arab-Israeli dispute had become politically toxic, the White House named a special envoy, Robert Strauss, to act as a “political shield” to deflect controversy from Carter. Those talks ultimately fell apart.

The Camp David Accords remain polarizing. Many scholars initially lauded the achievement of Egypt-Israel peace, which followed four major wars in 30 years, and the acknowledgment that Israel would need to dismantle some settlements and trade land for peace. Recent historians have been less kind. They contend that the accords undermined hopes for a comprehensive regional settlement, offered a pretext for Israel to tighten its grip on the West Bank and have prevented Palestinians from establishing a state.

Yet aside from the accords’ regional impact, Carter’s personalized brand of diplomacy left its own legacy. His extraordinary involvement played a critical role in nudging Egypt and Israel toward a deal, but it left a vacuum when he withdrew from negotiations. Failure wasn’t an option for Carter in Egypt-Israel talks. But with the president remote from subsequent Palestinian discussions, the failure of Carter’s subordinates to reach a deal left no political bruises.

The result is that it’s difficult for the United States to be taken seriously in Middle East peacemaking without the president’s direct intervention, further politicizing an issue already fraught with domestic political implications. For instance, the Oslo Accords, which were signed 25 years ago last week, came together after months of Norwegian-mediated negotiations between Israeli and Palestinian officials — and with little American involvement. Yet Oslo, in which Israel and the Palestine Liberation Organization granted each other mutual recognition and led to the establishment of the Palestinian Authority, didn’t become official until Yitzhak Rabin and Yasser Arafat famously shook hands on the White House lawn in front of a beaming Bill Clinton. Those accords crumbled in 2000 — but only after Clinton again had entered into high-profile direct negotiations with Israeli and Palestinian leaders in a futile effort to resuscitate the peace process.

Presidential leadership in foreign policy is imperative, but it must be used judiciously. The prestige of the office imbues presidents’ words with unparalleled authority. After all, there’s no one else to escalate to.

But presidential involvement also attracts domestic actors — interest groups, Congress and especially the media — that can further politicize foreign policy. Consider how little attention was garnered by the August cancellation of what would have been Secretary of State Mike Pompeo’s fourth trip to Pyongyang. Predictably, perhaps, Pompeo’s relative success in bringing back quiet, glamour-less diplomacy to the State Department has received relatively little notice.

Compare that with the hype surrounding Trump’s June meeting with North Korean leader Kim Jong Un in Singapore, where Time magazine said that “the stakes [were] dizzyingly high.” Despite Trump’s belief that he is a consummate dealmaker, presidents usually have little leverage in face-to-face talks. Just as presidents risk their own prestige when they stump personally for candidates at home — recall Trump’s campaigning for Roy Moore’s ill-fated candidacy — so does direct presidential involvement in international diplomacy jeopardize their political capital.

For now, Trump is focused on his legal challenges and the looming midterm elections. But if he feels further stymied at home, he may turn to foreign policy, where presidential power is less constrained. If Trump continues to favor personal diplomacy, as he did with Kim, in the hope that success will reflect well on him, he will be gambling that foreign policy victories can outweigh domestic woes in voters’ minds.

If, on the other hand, Trump uses Pompeo as a firewall against potential criticism, he may limit political exposure if relations falter. But he’ll also have to share any credit due in the event of a breakthrough.

And if one thing is clear 20 months into this presidency, it’s that Trump wants to be the center of attention, come what may.

Daniel Strieff is the author of “Jimmy Carter and the Middle East: The Politics of Presidential Diplomacy.”

Follow BDN Editorial & Opinion on Facebook for the latest opinions on the issues of the day in Maine.