One Obama administration security official after another was visiting to talk about terrorism, and Yemen's redoubtable president, Ali Abdullah Saleh, seemed to be savoring his newfound leverage.
The Americans are "hot-blooded and hasty when you need us," Mr. Saleh chided one visitor, Daniel Benjamin, the State Department's counterterrorism chief, but "cold-blooded and British when we need you."
It was Jan. 31, just a few weeks after a young Nigerian trained and equipped in Yemen had tried to blow up an airliner as it approached Detroit. The wave of attention to Al Qaeda's Yemen branch and its American-born propagandist, Anwar al-Awlaki, might not do much for tourism, but paradoxically it did give the Yemeni leader more influence.
Mr. Saleh said coyly that while he was "satisfied" with the military equipment the United States was supplying, he "would like to be more satisfied in the future," according to an account of the meeting sent to Washington.
Diplomatic cables obtained by WikiLeaks and made available to several news organizations offer the most intimate view to date of the wily, irreverent and sometimes erratic Yemeni autocrat, who over the past year has become steadily more aggressive against Al Qaeda. But he appears determined to join the fight on his own terms, sometimes accommodating and other times rebuffing American requests on counterterrrorism.
The cables do not substantially alter the public picture of Mr. Saleh (pronounced SAH-leh), 68, a former military officer who has led Yemen for three decades. But with direct quotations from private meetings, the cables are like crisp color photographs of what was previously in fuzzy black and white.
Yemen, long an arid, impoverished afterthought for the United States, now draws high-level American attention far out of proportion to its size. In October, militants in Yemen sent off printer cartridges packed with explosives to Chicago addresses. The bombs were intercepted, but the plot set off a furor and prompted the latest in a series of phone calls between President Obama and his Yemeni counterpart about counterterrorism and aid.
At times, the cables show, Mr. Saleh has not hesitated to use his country's daunting problems as a kind of threat.
"Referencing the high poverty rate and illicit arms flows into both Yemen and Somalia, Saleh concluded by saying, 'If you don't help, this country will become worse than Somalia,'" said a September 2009 cable from the American ambassador, Stephen A. Seche, describing Mr. Saleh as being in "vintage form."
The cables portray Yemen, a land of 23 million people that is nearly the size of Texas, as a beleaguered, often baffling place, bristling with arms and riven by tribal conflict, where shoulder-launched missiles go missing and the jihad-curious arrive from all over the world. The Americans are seen coaxing the Yemenis to go after Al Qaeda, working out the rules for American missile strikes, seeking a safe way to send Yemeni prisoners home from the Guantánamo Bay prison and sizing up Americans caught in Yemeni security sweeps.
'Open door on terrorism'
Always at the center of the diplomatic traffic is Mr. Saleh, who first appears seeking a half-million tons of wheat in a 1990 meeting with James A. Baker III, then the secretary of state. These days, his most pressing requests are for heavy weapons and military training. But he also has become more cooperative with the American campaign against Al Qaeda.
In a 2009 meeting with John O. Brennan, President Obama's top counterterrorism adviser, Mr. Saleh offered an unusual bargain. He "insisted that Yemen's national territory is available for unilateral CT operations by the U.S." — but with a catch. If there were to be an attack on a Western target, Mr. Saleh said, it would not be his fault.
"I have given you an open door on terrorism," he said, "so I am not responsible."
In fact, despite such rhetoric, Mr. Saleh has imposed strict limits over American operations in his country, even as he has helped disguise them as his own.
When the first two American missile strikes against Qaeda camps in Yemen took place in December 2009, Mr. Saleh publicly claimed that they were Yemeni strikes to avert any anti-American backlash. Gen. David H. Petraeus flew to Yemen to thank the president, who promised to keep up the ruse. "We'll continue saying the bombs are ours, not yours," Mr. Saleh said, according to a cable.
A deputy prime minister, Rashad al-Alimi, had already assured the Americans that "U.S. munitions found at the sites" of strikes "could be explained away as equipment purchased from the U.S."
Moreover, Mr. Alimi implied that Yemeni officials accepted as inevitable that the missiles had killed civilians along with militants. They were Bedouin families — "poor people selling food and supplies to the terrorists" and thus "acting in collusion with the terrorists and benefiting financially," he said.
Still, Mr. Saleh told General Petraeus that "mistakes were made" in the killing of civilians. He agreed to the American commander's proposal that to improve accuracy, future strikes would be carried out by American aircraft rather than by cruise missiles fired from distant ships.
But he firmly denied General Petraeus's request to send American advisers along on Yemeni counterterrorism operations. For his part, General Petraeus put off Mr. Saleh's request for 12 armed helicopters, even though the president promised to use them "only against Al Qaeda." The United States has been wary of fueling the Yemeni government's long-running conflicts with the so-called Houthi rebels in the north and secessionists in the south.
Guantanamo a source of tension
The two sides also sparred over Yemen's restrictions on material the United States shipped to its embassy in the diplomatic pouch, which the Yemenis evidently suspected was being used to import eavesdropping equipment. The Americans have complained about poor security at the airport in Sana, Yemen's capital, including X-ray screeners who do not watch their monitors, and also security officers who "harass" American diplomats.
Beyond such testy bargaining, emptying the Guantánamo Bay prison, where Yemenis are the single largest group remaining, has been a regular source of tension. When Mr. Saleh rejected an American plan to send the Yemenis to a Saudi rehabilitation program in March 2009, a cable described him as "dismissive, bored and impatient" and said he had "missed a good chance to engage the new administration on one of its key foreign policy priorities."
At the same time, the embassy was tracking the growing number of Yemeni arrests of expatriate Americans suspected of having links to militants. By last February, such arrests were occurring about once a week, and Mr. Seche wrote to Washington that the embassy's "sharply increased workload" urgently required more personnel.
"In the past two years, the Muslim convert community of Amcits living in Yemen," Mr. Seche wrote, using shorthand for American citizens, "has been increasingly linked to extremist activities." Sorting out such cases was difficult, a February cable said, citing an American woman who had reported the midnight arrest of her husband but appeared to be "omitting or manipulating critical details."
Yemen had become a magnet for would-be jihadists from around the globe, and a January cable listed 23 Australian citizens and residents to be added to terrorism watch lists because of activities in Yemen or connections to Mr. Awlaki, the radical cleric hiding there. Many of the Australians were women, and Qaeda operatives in Yemen were seeking "to identify a female for a future attack," the cable said.
The cables report on American and Yemeni attempts to track down and destroy stocks of the shoulder-fired missiles known as "manpads," for man-portable air-defense systems. Their lethality against aircraft make them a major counterterrorism concern.
Yemen's Defense Ministry insisted that it had no stocks of such missiles, but Yemen's National Security Bureau — a newer agency that works closely with the United States — told the Americans that the Defense Ministry "does indeed have MANPADS, but would never speak of them because they are considered a state secret."
A close ally in the counterterrorism efforts, the cables make clear, is Prince Muhammad bin Nayef, the deputy interior minister in neighboring Saudi Arabia, who in October tipped off American officials about the parcel bomb plot. Shortly after the attempted bombing of the airliner bound for Detroit, Prince Nayef told Gen. James L. Jones, then President Obama's national security adviser, that the only way to combat Al Qaeda in Yemen was to "keep them on the run" and that Yemeni and American strikes on Al Qaeda were proving effective.
Saudi authorities "have been monitoring conversations of Al Qaeda operatives in Yemen very closely, and whereas before the attack they were hearing relaxed 20-minute phone conversations over cellphones, after the attack the phones went virtually silent," Prince Nayef said, according to a cable. That showed that Qaeda operatives "are more focused on their own security rather than on planning operations," he said.
Andrew W. Lehren contributed reporting from New York.
This article, "Yemen Helps U.S. Fight Al Qaeda, on Its Own Terms," first appeared in The New York Times.