Around a long table in a windowless room, the CIA officials awaited the decision from their director, Leon Panetta.

"A little too salty," the CIA chief finally said, giving thumbs down to the dish prepared by a warring team of cooks from the reality TV show "Top Chef."

Panetta also guessed, quickly and correctly, that it was beef Wellington. The episode, dubbed "Covert Cuisine," featured traditional dishes disguised as something else. "Poor disguise," Panetta said. "They would have captured this individual and hung him!"

Laughter among the assembled guests followed. But this comic turn, not normally in the CIA playbook, was only partly for fun. The access and time Panetta gave the show is a classic example of the former legislator's efforts to charm not just the public, but the White House and Capitol Hill in his first 18 months in office.

Panetta is working to protect the CIA's budget at a time when Congress is looking around for cuts, and to guard the CIA's role as the lead agency in the war on terror. Panetta also hopes to boost the morale of a staff that's been criticized and even prosecuted for its practices, including its handling of terror suspects who have been whisked away to "black sites," or secret prisons, and sometimes waterboarded.

Panetta has built on predecessor Michael Hayden's public overtures, which included an appearance on the National Public Radio program "Wait Wait ... Don't Tell Me!" Combined with negotiating skills honed as chief of staff to President Bill Clinton and 16 years as a California congressman, he's been a formidable fighter for the agency.

"He's tough, knows the Hill, and clearly has President Obama's support," said Hank Crumpton, a former high-ranking CIA official.

Panetta scored a knockdown in his bureaucratic face-off with the now-deposed director of national intelligence, Dennis Blair, over who got to choose America's chief intelligence representatives overseas. President Barack Obama ruled that the CIA director does.

Panetta has also pushed to keep the CIA leading the war against violent Islamic extremism at a time when the White House grew increasingly comfortable using the U.S. military's special operating forces in roles that were previously the sole purview of the agency.

"I happen to think that we are the premier operational unit of all our intelligence agencies," Panetta told his staff, according to a transcript from a CIA town hall meeting last year.

He's maneuvered hard to protect that role. After a recent interagency squabble over who would continue to provide key tactical intelligence to U.S. forces in Afghanistan, former officials said the CIA prevailed and the military's contracts to provide similar information were canceled.

Panetta's supporters say he's also won public and political support simply by bragging about what the agency has accomplished.

He gave rare, public confirmation of a CIA hit on an al-Qaida target on ABC News in June, when he said the agency had killed its No. 3 leader, Mustafa al-Yazid, in Pakistan's tribal areas. Panetta did not describe the method of attack, but local media reported that al-Yazid was killed by a missile from an aerial drone.

That interview upset some of the agency's operators, who worried that confirming the CIA's role in the strike could cool relations with Pakistan's government, which faces a public that's suspicious of the U.S. and largely opposed to working closely with the Americans.

Panetta has tried to smooth relations with Islamabad, meeting directly with his Pakistani counterparts together with White House national security adviser Jim Jones last May.

Combining Capitol Hill-style arm-twisting with a sports metaphor, Panetta and Jones warned that the U.S. government might take tougher action in Pakistan if the country gets "a third strike" — that is, is again the source of an attempted terror attack against a U.S. target.

They were referring to the two previous cases of Afghan Najibullah Zazi, arrested in connection with a plot to bomb the New York subway, and Faisal Shahzad, arrested after allegedly trying to blow up a car bomb in Times Square. Prosecutors said both suspects trained in Pakistan.

Panetta's charm offensive on Capitol Hill has defused the tension of his early tenure, when he clashed with House Speaker Nancy Pelosi.

She'd said the CIA lied to her, allegedly withholding details about waterboarding in a briefing years earlier. Panetta defended the agency fiercely.

Now Panetta can be spotted, with his small security entourage, in the warren-like halls of Congress, heading to monthly coffees he's instituted with the House and Senate intelligence committees.

The intelligence chief also extends prized invitations to meals at his private dining room, next to his office on the seventh floor of CIA headquarters in Langley, Va., much as the president issues coveted offers of visits to the Oval Office. These dinners are marked by the informality of a big Italian-American family get-together, with frequent jokes and colorful language — disarming for journalists and legislators alike.

Panetta so won over the heads of the congressional intelligence committees that they called for him to replace Blair — a job Panetta turned down, former officials say, because he likes working at the CIA too much.

Panetta helped stave off congressional investigations into alleged CIA misdeeds, like the secret detention of suspects in Italy, which left a trail of evidence that Italian investigators revealed in court.

But he could not save the agency from the ongoing investigation into the destruction of videotapes of terror suspects undergoing waterboarding and other "enhanced interrogation methods."

The specter of prosecution by the current administration for deeds sanctioned by a previous administration has had a chilling effect on morale, said former CIA officer Bob Baer. He pointed out that since some of the litigation during the Bush administration, CIA officers have been advised to take out lawsuit insurance when they join the agency.

Panetta has tackled the morale problem by racking up 100,000-plus frequent flyer miles, visiting some 40 CIA stations and bases in more than two dozen countries.

His role is part father figure and part cheerleader, and he plays it for a team that Baer says feels it are under fire — figuratively at home, literally abroad.

Panetta supported allowing the families of the dead in the December 2009 suicide bomb attack at Khost, Afghanistan, to release the names of their loved ones — at least, the names of those who hadn't been working undercover. Seven CIA employees were killed in that attack. They were honored with stars on the wall in the CIA's marbled entryway — tributes to CIA officers whose names only rarely are revealed.

"Our officers are on the front lines," Panetta said to a group of agency staffers overseas, in remarks obtained by The Associated Press. "You can't overestimate how important you are."

His solemn comments contrasted sharply with the dining room banter on "Top Chef," and were more in line with what the agency expects from its leader.

Perhaps that's why it was almost a relief when an aide interrupted the filming by handing Panetta a note. He read it, arched his eyebrows, and excused himself from the table, saying, "Business calls."