WASHINGTON — Both were Nobel Prize laureates who labored for peace in the Middle East but failed to achieve it. Now, their joint efforts are at an end as President Barack Obama prepares to pay a final tribute to Shimon Peres in Jerusalem.

Obama boarded Air Force One on Thursday afternoon to fly to Israel to join dozens of other world leaders at the funeral of Peres, the former prime minister, president and elder statesman who died at age 93.

The two leaders shared similar visions for a two-state solution to resolve the Israel-Palestinian conflict. Peres’ son-in-law and personal physician, Dr. Rafi Walden, said Obama had called the family overnight on Wednesday during Peres’ final hours and spoke to Peres’ daughter, Tzvia. “We are deeply moved,” Walden said.

Obama awarded Peres the Medal of Freedom, the United States’ highest civilian honor, in 2012, saying “Shimon teaches us to never settle for the world as it is.”

In turn, Peres bestowed the Medal of Distinction on Obama, making him the first sitting U.S. president to receive Israel’s highest civilian honor.

“This award speaks to you, to your tireless work to make Israel strong, to make peace possible,” Peres said in 2013. “Your presidency has given the closest ties between Israel and the United States a new height, a sense of intimacy, a vision for the future.”

Those who worked with both men said they shared mutual respect and affection.

“Even a man into his 90s, Peres was always thinking about the future,” said Dennis Ross, a fellow at the Washington Institute for Near East Policy and a former adviser to Obama. “I think that captured the president’s imagination and added to the respect for him.”

Ross, who said he spoke often with Peres during the past three decades, said the Israeli leader believed that Obama’s heart was in the right place. But “he wasn’t always convinced that the president fully understood the nature of Israel’s predicament in the region,” Ross said.

Obama and former President Bill Clinton will attend the service for Peres. President George W. Bush had committed to his annual 100-kilometer mountain bike ride with wounded veterans and is not expected to attend.

Presenting the Medal of Freedom, Obama called Peres a true founding father who knew the necessity of strength. He said Peres also recognized that a nation’s security also depends upon the righteousness of its deeds. “Even in the darkest moments, he’s never lost hope in, as he puts it, ‘a Middle East that is not a killing field but a field of creativity and growth,'” Obama said.

Peres used the moment to reflect on how the United State and Israel are linked in the pursuit of liberty. He also warned that Iran served as a danger to that liberty and was a nation ruled by a leadership that aimed to rule the Middle East. “They bring darkness to a world longing for light.”

Obama has staked his foreign policy legacy on a deal with Iran designed to prevent it from developing nuclear weapons. Ross said that Peres supported efforts to constrain Iran’s nuclear ambitions. He also saw some weaknesses in the deal, but felt the best way for Israel to influence the deal was to do so quietly rather than publicly.