Amid the initial wave of leaks by former intelligence contractor Edward Snowden, U.S. officials arranged closed-door briefings with lawmakers in a bid to contain the damage. As tensions rose in a session with members of the House of Representatives, Robert S. Litt, the intelligence community’s top lawyer, showed his pique:

“Well, you’re the ones who passed it,” he said, referring to the law being used to collect the phone records of virtually every U.S. citizen. “And if you don’t like it,” he added, according to participants, “you can always repeal it.”

Meant to quiet the crowd, the remark instead triggered hostile applause among members inclined to take Litt’s dare — a reaction that underscored how rapidly the political terrain was shifting for spy agencies and the level of antagonism their attorney could provoke.

As general counsel to the director of national intelligence, Litt has assumed an unusually high-profile role in the aftermath of the Snowden leaks, serving as the point person in defending the massive surveillance programs to Congress and the public.

He has defended spy agencies aggressively in dozens of congressional hearings and other settings. He has battled news organizations to keep some Snowden material out of news reports and fired off a steady stream of ­e-mails accusing reporters of sloppy or sensationalized work. He has also alienated some key lawmakers, including Rep. Mike Rogers (R-Mich.), the chairman of the House Intelligence Committee, who for the past six months has effectively banned Litt from appearing before the panel, even behind closed doors.

Litt is praised by some for his willingness to defend agencies confronting perhaps the most damaging series of leaks in their history. Amid that deluge, “the agencies need someone nimble on his feet, who can think quickly and come across as thoughtful and substantive,” said Rep. Adam B. Schiff (D-Calif.), a member of the intelligence panel. “He meets all those criteria.”

But others said Litt’s abrasive tendencies — and the damaged credibility of his boss, James R. Clapper Jr. — have compounded the challenge of containing the Snowden fallout.

This month, Litt sent letters to news organizations insisting that Clapper hadn’t lied when he testified before Congress in March that U.S. spy agencies were not collecting data on large numbers of Americans. He said that Clapper was referring to a separate surveillance program and that in that context, “his answer was and is accurate.”

Litt’s account is the fourth attempt by the DNI or his subordinates to explain the episode, and it is at odds with Clapper’s own previous admission that he had given the “least untruthful” answer he could in response to a question about a classified program.

The ongoing controversy has become a source of frustration to senior National Security Agency officials and others struggling to restore public confidence in spy agencies and defend the integrity of their leaders.

“You have Clapper, who is on the hook for lying to Congress, and then you have the lawyer who failed to tell his principal he was going to get sandbagged and failed to correct that after it happened,” said a senior U.S. official who spoke on the condition of anonymity because he was not authorized to speak on the record. “It’s not helping.”

In an interview, Litt voiced frustration with the continued focus on Clapper and said he has sought only to be straightforward in his dealings with Congress. “People perceive me the way they perceive me,” Litt said. Telling members they could repeal surveillance authorities “certainly wasn’t intended as being abrasive or hostile . . . I pride myself on being candid.”

Clapper said he has total confidence in Litt. “Bob is not the kind of guy who’ll just tell you what you want to hear,” Clapper said in a statement to The Washington Post. “He’s intelligent, candid and brutally honest and those qualities have made him invaluable to me in my role as DNI.”

Unusually public role

Litt’s level of public exposure runs counter to the tendency of most intelligence community lawyers to remain in the background and has caught former colleagues off-guard.

“You don’t really want the general counsel spinning,” said former director of national intelligence Dennis C. Blair, who hired Litt during President Obama’s first term. Litt has been an effective advocate in a moment of crisis, Blair said, but “it is a little bit odd, and it probably puts Bob a little bit out of his original skill.”

In some ways, however, Litt’s assignment marks the culmination of a career spent fiercely protecting the interests of law enforcement and intelligence agencies, as well as some of their most controversial operatives.

Disclosure forms he submitted to the Senate Intelligence Committee before returning to government in 2009 indicate that he had represented “several present and former employees of the CIA in Dept. of Justice, congressional and [inspector general] investigations” over the past decade.

Litt, 64, did not disclose the names of those clients. But current and former U.S. officials said they included a CIA analyst, Alfreda Frances Bikowsky, who was tied to a critical intelligence-

sharing failure before the Sept. 11, 2001, attacks and the botched 2003 “rendition” of an innocent German citizen thought to be an al-Qaeda operative. Khaled el-Masri spent five months in a CIA prison, where he has said he was brutalized, before the agency admitted its mistake and quietly set him loose in Albania.

Litt’s eight years out of government during the administration of George W. Bush were a financially rewarding stretch. He listed annual income of $975,000 in 2008, and he worked for clients such as Philip Morris and the government of Israel as a partner with the Washington office of the law firm Arnold & Porter.

But Litt made clear in a 2006 interview that he got little pleasure from such work. “Private practice has turned from a learned profession into a business,” he told the Yale Law Review, urging new graduates to avoid jobs at big firms: “Don’t follow the money.”

Litt has donated tens of thousands of dollars to Democratic candidates and causes, and friends describe him in somewhat contradictory terms: an avowed liberal on social issues but a true believer in the propriety of surveillance programs such as those exposed by Snowden.

“I don’t know if he’s a card-

carrying member of the ACLU, but it wouldn’t surprise me that he makes contributions there,” said Irvin B. Nathan, a former Litt colleague who serves as attorney general for the District of Columbia. But when defending spy agencies, Nathan said, Litt is a “zealous advocate.”

Litt’s ascent through the U.S. government’s legal ranks was swift but included setbacks. He was a clerk to Supreme Court Justice Potter Stewart before taking a job as assistant U.S. attorney in the Southern District of New York.

“My initial impression was that he was very smart, kind of pre­cocious,” said Mark F. Pomerantz, a longtime friend. He told what he called a “classic Bob Litt story” that unfolded as then-U.S. Attorney John S. Martin Jr. was outlining strategy with his legal team. Litt endorsed one of his boss’s ideas by saying, “You know, that’s not as stupid as it sounds.”

“He has a healthy ego,” Pomerantz said. “But he is willing to listen and reconsider, and he doesn’t get dug in just for the sake of proving that he’s the smartest guy in the room.”

During the Clinton administration, Litt was nominated to be chief of the Justice Department’s criminal division but withdrew after his admitted use of marijuana in the 1970s complicated his prospects for confirmation. Instead Litt took a post that didn’t require Senate approval and that involved reviewing applications for the Foreign Intelligence Surveillance Court, the secret panel now under scrutiny for authorizing the programs exposed by Snowden.

Litt was involved in the major national security debates of Obama’s first term — including the decision to kill an al-Qaeda figure, Anwar al-Awlaki, an American citizen, in a drone strike in Yemen — but he wasn’t seen as a key player.

‘He strives to be candid’

The response to the Snowden avalanche, which required co­ordination across the intelligence community and a grasp of surveillance law, moved Litt closer to the center of events. Part prosecutor and part defense attorney, Litt has attacked Snowden’s motives and actions while making no acknowledgment that spy agencies overstepped.

“He doesn’t strive to be popular, he strives to be candid,” John C. Inglis, deputy director of the NSA, said in an interview. “He’s courageous about that. He’s pure-hearted.”

Some lawmakers have found Litt’s manner off-putting at best. Rogers, the chairman of the House Intelligence Committee, made clear to the DNI’s office last summer that Litt was no longer welcome before his panel.

“The committee has not found Bob to be the most effective witness to explain complex legal and policy issues,” said a U.S. government official familiar with the falling-out. Rogers was also bothered that Litt faulted the committee for not doing more to share information about the surveillance programs with other members, unaware that doing so would have violated committee rules.

Rogers declined to comment for this report. Litt would say only that he has “tremendous respect for Rogers. I think he’s done a fabulous job, and I’ve told him this to his face.”

Litt’s testimony before other committees has been conciliatory in tone but often tailored in legalistic fashion to obscure broader truths. Asked in July about location data emitted by cellphones, Litt said, “We’re not collecting that under Section 215.” In a speech days later, he said, “We don’t randomly target e-mail addresses or collect all foreign individuals’ e-mails under 702.”

Snowden’s revelations later showed that the NSA was gathering both kinds of information in massive quantities, although the caveats of Litt’s statements — and references to surveillance law — made them technically accurate.

Litt’s latest foray, his letters to the New York Times and the New Yorker magazine, made even some supporters wince at the renewed attempt to defend Clapper’s testimony last year that the NSA was not gathering data on millions of Americans.

Clapper’s office had been warned that he would be questioned on the subject by Sen. Ron Wyden (D-Ore.). Litt said that the office prepared talking points for the director based on that warning, but he could not explain why Clapper hadn’t seen them.

As part of his 2009 confirmation, Litt was asked what he would do if the DNI ever made a significant public statement that was erroneous or misleading. “If I was not satisfied with the director’s explanations and could not convince the director to correct the statement, I would consider resigning,” Litt said at the time.

In his interview, Litt said he never considered doing so after Clapper’s testimony last spring. “I was satisfied with the director’s explanation,” Litt said, citing only one regret. “If I had this to do all over again . . . I would recommend the DNI send a classified letter to the committee correcting the matter.”

Clapper did send such a letter months later, but only after his false testimony had been exposed by Snowden. Asked why Clapper hadn’t done so sooner, Litt said: “Because his general counsel, among others, didn’t recommend it to him.”