Updated

Former President Jimmy Carter felt his efforts to rescue U.S. diplomats held hostage by Iran should have worked but were thwarted by a "strange series of mishaps," and the mission's failure played a major role in his 1980 re-election defeat, the Democrat writes in a new book assembled from diary entries.

The Associated Press purchased a copy of the book, "White House Diary," on Friday, ahead of its release Monday.

In it, he criticizes several presidents, including fellow Democrats Bill Clinton and Barack Obama, for not bringing sufficient pressure on Israel to stop building settlements on the West Bank. He writes that construction was "especially rapid" during Clinton's administration and he believes Obama has "backed away" from his initial commitment to a settlement freeze.

The book highlights Carter's difficulties in working with then-House of Representatives Speaker Thomas P. "Tip" O'Neill, chronicles his failure to get much of his agenda through Congress and expresses the bitterness he felt toward political rival Sen. Edward M. Kennedy.

But it also shows his pride in helping to bring peace between Egypt and Israel with the Camp David accords and other foreign-policy and domestic accomplishments. The diary entries show he felt at the time that he had "a firm grip on my presidential duties" and a clear sense of what he wanted to do.

Carter, 85, said that nearly every day of his presidency, he dictated his thoughts and observations and turned the tapes over to his secretary, Susan Clough, who typed and put them in a binder. Thirty years later, he condensed and annotated the diary with recent reflections. The book was published by Farrar, Straus and Giroux.

He described his difficult relationship with O'Neill, saying the most unpleasant experience of his presidency was a breakfast at which O'Neill was "extremely abusive" toward him and others in the room. Carter had a rocky relationship with the House speaker throughout his term.

Carter also reveals his thoughts at the time about Kennedy, his 1980 rival for the Democratic presidential nomination. He writes that he first learned Kennedy would challenge him when briefed in early 1978 by then-Sen. Joe Biden, now vice president. He also praises Biden as his "most effective supporter" in the 1976 presidential campaign.

After a 1979 meeting with Kennedy that included a discussion of health care, Carter wrote that it was almost impossible to understand what the senator was talking about but it was obvious their approaches differed. Carter also discussed his differences with Kennedy over health care in an interview with CBS' "60 Minutes" to be shown Sunday.

Of Kennedy's failed nomination challenge, Carter wrote in June 1980, ahead of the Democratic National Convention in New York City, that the Kennedy group had been uncooperative in drafting the Democratic Party platform and clearly wanted a confrontation.

On Election Day, Nov. 4, 1980, as he saw his re-election hopes slipping away, Carter had bitter thoughts about the Kennedy challenge. He said eight months of Kennedy's attacks had hurt him, and he had to spend much time trying to recruit back natural Democratic constituencies, such as Jews, Hispanics, African-Americans, the poor and labor.

In observations newly added to the diary, Carter wrote that his own polling found that potential general election support for Kennedy was weak and he was uncertain whether Kennedy's real goal was to win or just to stop him from being re-elected.

But Carter mostly blamed his election loss on his failure to win the release of U.S. hostages held captive in Iran.

A day before losing the election, he observed that his pollster, Pat Caddell, was finding "massive slippage" in his support as people realized the hostages were not coming home. Undecided voters were moving almost entirely to Ronald Reagan.

Fifty-two American diplomats and military officials were held captive for more than a year by a group of Islamist students who supported the Iranian revolution. The hostages were released on Jan. 20, 1981, just minutes after Reagan was sworn in as president.

In the spring of 1980, Carter ordered a helicopter rescue attempt -- one that ended disastrously and left an indelible scar on his presidency. Two of the eight helicopters developed problems on the way to a remote desert landing spot and had to turn back; a third had a hydraulic problem after landing. Carter canceled the mission but during the withdrawal, a helicopter collided with a C-130 transport plane, resulting in eight deaths.

Carter called it "a strange series of mishaps, almost completely unpredictable" and insisted the rescue operation should have worked because the men were well trained, planning was careful and no Iranian alarm was raised until at least two hours after U.S. crews had left Iran.

Also in the book:

--He vents at the state of New York. On the March 1980 day that Kennedy won the New York Democratic primary, Carter fumed, "It's a unique state, with a habit of sucking at the federal budget" more than other states.

--He writes that he's sorry that he seems to have alienated the Jewish community, suggesting he deems such criticism to be unfair.

--He owns up to mistakes in dealing with Congress and not being concerned enough about how his proposals played with the voters most crucial to lawmakers.

And he says he's surprised at how many of the problems he faced back then are confronting Obama now.