Mr. Saleh’s erratic approach compounded the situation. In that same conversation, for example, he “signaled that rehabilitation is not his concern, but rather ‘the U.S.’s problem’ because he is ready and willing to accept all Yemeni detainees into the Yemen prison system.” But moments later, he assured Mr. Brennan that he was committed to “freeing the innocent people after a complete and total rehabilitation.”

Neither Mr. Saleh nor the Saudis were enthusiastic about an American proposal to send Yemeni detainees to a Saudi deradicalization program, cables show. But when Mr. Saleh proposed a Yemeni version, the United States showed interest — but also caution.

In March 2009, Mr. Saleh demanded $11 million to build such a program in Aden, but Mr. Brennan replied that “such a program takes time to develop and that Saleh had his hands full dealing with al-Qaeda in Yemen.” When the two met again six months later, Mr. Saleh “repeatedly,” according to a cable, asked how much money he could expect. When Mr. Brennan “offered $500,000 as an initial investment currently available for the crafting of a rehabilitation program, Saleh dismissed the offer as insufficient,” the cable said.

Several cables shed light on the Saudis’ rehabilitation program. A March 2009 dispatch estimated that the program had processed 1,500 extremists, including 119 former detainees. That cable put the “recidivism rate” at 8 to 10 percent, arguing that “the real story of the Saudi rehabilitation program is one of success: at least 90 percent of its graduates appear to have given up jihad and reintegrated into Saudi society.”

Over time, however, the numbers apparently slipped. In March 2010, Daniel Fried, the State Department’s special envoy for closing the Guantánamo prison, told European Union officials that the Saudi program was “serious but not perfect,” citing a failure rate of 10 to 20 percent. Another cable noted that of 85 militants on a “most wanted” list published by Saudi authorities in early 2009, 11 were former Guantánamo detainees. But the cables offer details on only a few individual cases — like a Saudi who became a leader of Al Qaeda’s Yemen branch and a Kuwaiti who committed a suicide bombing in Iraq in 2008, both of which have been previously reported.

The suicide bomber proved deeply embarrassing for the Kuwaiti government. Months later, in February 2009, Kuwait’s interior minister proposed a solution for other detainees who seemed too extremist for reintegration into society: let them die in combat.

“You know better than I that we cannot deal with these people,” the minister, Sheik Jaber al-Khaled al-Sabah, told the ambassador, a cable reported. “If they are rotten, they are rotten and the best thing to do is get rid of them. You picked them up in Afghanistan; you should drop them off in Afghanistan, in the middle of the war zone.”