WASHINGTON — Former US defense secretary Robert Gates joked Monday about the downsides of his old job, including enduring interminable NATO meetings and price gouging over a Central Asian air base.

At a Pentagon ceremony for the unveiling of his official portrait, the ex-CIA director displayed his customary wry humor, saying he was glad to be done with long-winded NATO sessions, long-haul flights across the Pacific and talks about a certain airfield in Kyrgyzstan.

As he writes a memoir of his tenure as defense secretary, Gates said he had "been reflecting on some of the things and some of the people that I miss... and frankly many more that I don't."

"I confess that back at CIA, I might have been less motivated to win the Cold War if I had known the result would be NATO conferences in which 28 defense ministers would be present, all entitled to speak," he said.

And he recounted numerous meetings with his counterparts around the world, citing "the less edifying experience of being shaken down by the defense minister of Kyrgyzstan for rent at Manas air base."

Heavily reliant on Manas as a hub for moving troops and equipment in and out of Afghanistan, the United States has had to agree to high rental fees to maintain access to the strategic base.

Gates, 69, also found hours-long hearings before US congressional committees trying, saying: "The less said about the latter, the better."

Although the Pentagon was mostly empty Monday due to Hurricane Sandy, which prompted the closure of federal government offices, top brass and civilian leaders braved rain and wind from the storm to pay tribute to Gates, who served in the post from December 2006 to June 2011.

The current defense secretary, Leon Panetta, praised Gates for taking on the Pentagon's entrenched bureaucracy to get heavily-armored vehicles to troops in the field and for improving medical evacuations for forces wounded in Afghanistan.

The painting unveiled Monday -- by Everett Raymond Kinstler, who has produced portraits of former American presidents -- depicts Gates in a black pin-stripe suit, sitting next to a model of the MRAP, the Mine Resistant Ambush Protected vehicle that he made an urgent priority.

Gates took over as defense secretary in 2006, after the polarizing tenure of Donald Rumsfeld, who became a lightning rod for critics of the Iraq war.

"From the beginning, his calm demeanor, his no-nonsense straight talk delivered in that Kansas twang, helped reassure a country... that was badly shaken by the growing toll of the Iraq war," Panetta said of his predecessor.

After his wise cracks, Gates' remarks took on a poignant tone as he spoke of the burden of signing orders to send young men and women to war.

"That was a responsibility that weighed on me every day that I was secretary, so much so that toward the end of my time in office, I could barely speak to them or about them without being overcome with emotion," he said.

"Frankly, I began to worry that my devotion to protecting them was beginning to cloud my judgment and diminish my usefulness to the president, and thus played a part in my decision to retire."

Whatever the verdict of future historians about his term at the Pentagon, Gates said he hoped he would be remembered as someone who tried to look out for the needs of the troops in battle.

No one in a senior position in the Defense Department should forget "that our comfort and safety are borne on the brave and broad shoulders of those young men and women in uniform" and that "it is our duty, our sacred obligation" to take care of them at war and when they return home, he said.