How photographs saved the Israel-Egypt peace talks

Former President Jimmy Carter has said one of his greatest successes was his work for Mideast peace that led to a treaty between Egypt and Israel.

Carter, who served as the 39th president from 1977 to 1981, said after 13 days of tough negotiations a peace deal seemed set for failure, but signed photographs helped turn the discussions around.

In 1978, the president brought Israeli Prime Minister Menachem Begin and Egyptian President Anwar Sadat to Camp David for peace talks in order to end 30 years of war.

"The peace agreement that I was trying to negotiate had broken down. We were in our 13th day at Camp David and I decided that it was over because Prime Minister Begin was so adamant about not removing his Israeli settlements from Egyptian territory. I had given up," Carter told Tania Bryer, host of "CNBC Meets."

Read MoreJimmy Carter: Slavery is worse now than in 1700s

Before leaving, Begin had requested signed photographs with the president for each of his eight grandchildren. Carter said it was the gesture of signing each photo personally that stopped the talks from falling apart.

"Instead of just saying best wishes Jimmy Carter, I got my secretary to get their names and I put 'with love and best wishes to' and I put (the) names of his grandchildren," he said.

"He was quite angry with me at the time. He just said, 'Thank you Mr. President.' But he called out the name of his first grandchild, and then he called out the name of his second grandchild and he had tears running down his cheeks and so did I. Then he said in effect why don't we try one more time, and so we tried one more time and we were successful," Carter said.

The Egypt–Israel Peace Treaty was signed in Washington in March 1979, witnessed by Carter.

Relations between the two countries improved afterward, with trade agreements and airline flights. Egypt also started to supply Israel with crude oil.

Read MoreIsrael accepts new Gaza cease-fire

In 1980, Carter lost the election to Ronald Reagan and left the White House for his home town of Plains, Georgia, the following year.

Carter said that had he been given the chance of another term, he would have firmly implemented peace with Israel and its neighbors.

"That (peace) was never fully implemented. So now 35, 40 years later we still have Israel not at peace with its neighbors. But my successors were not very interested in the Middle East peace process, not as deeply as I was, and that's one of the things I could have done differently," he said.

CORRECTION: An earlier version misspelled Ronald Reagan's last name.