Feinstein's Support for N.S.A. Defies Liberal Critics and Repute J. Scott Applewhite/Associated Press Senator Dianne Feinstein with Senator Patrick J. Leahy. She has been forthright and unapologetic in defending surveillance efforts. WASHINGTON - She fought so hard to outlaw assault weapons that the National Rifle Association deemed her efforts tantamount to proposing the largest gun ban in American history. Well before the Supreme Court took up same-sex marriage, she sponsored a bill to repeal the Defense of Marriage Act. And she urged President George W. Bush, and later President Obama, to shut down the prison camp at Guantánamo Bay, Cuba. But Senator Dianne Feinstein - California Democrat and liberal lioness - has taken on a role that is leaving many of her allies on the left dismayed: as perhaps the most forthright and unapologetic Congressional defender of the National Security Agency's surveillance programs. "I think it's an act of treason," she said of the leaks by Edward J. Snowden, the N.S.A. contractor who revealed classified details about the programs, even as many liberals were hailing him as a whistle-blower. She has praised James R. Clapper Jr., the director of national intelligence, who has been accused of lying to the Senate about the scope of the programs, as an honest and direct man. At 80 - the Senate's oldest member - she says she is resolute that the danger from terrorists demands an aggressive national security apparatus. "I feel I have an obligation to do everything I can to keep this country safe," Ms. Feinstein, who as chairwoman of the Senate Intelligence Committee is one of the few Americans with detailed knowledge of the N.S.A."s efforts, said in a recent interview from her private Capitol Hill office. So put that in your pipe and smoke it. Although her political upbringing in the liberal bastion of San Francisco City Hall, where she served first as a city supervisor and then as mayor, suggests otherwise, her beliefs have always defied an easy caricature. She supports capital punishment, saying the Boston Marathon bombings should be prosecuted as a death penalty case. She cast votes to sustain the Iraq war until its later stages and voted to confirm Bush cabinet and judicial nominees from her position on the Senate Judiciary Committee. Her Democratic colleagues on the Judiciary Committee often had no idea when she would vote against them. Her support for Mr. Bush's nominee for attorney general in 2007, Michael B. Mukasey, prompted some in the California Democratic Party to try to censure her. To her critics today, she is just another victim of Stockholm syndrome on the Congressional Intelligence Committees: an enabler of government overreach who has been intoxicated by the privilege of knowing the deepest-held state secrets. Her ardent defense of the government's surveillance efforts has put her at odds with some Democrats on the Intelligence Committee who have called on the Obama administration to narrow the scope of the N.S.A."s data collection efforts. "She and I, in terms of policy issues, growth, energy, social issues, we certainly agree on the overwhelming number of issues," said Senator Ron Wyden of Oregon, who along with Senator Mark Udall of Colorado has been a voice of dissent on the Intelligence Committee. But, you know, families disagree. He added, "Here's why we're going to win: Because our side believes that security and liberty are not mutually exclusive." Ms. Feinstein, never one to shy away from uncomfortable disagreements with colleagues, observed that Mr. Wyden and Mr. Udall were in the minority in their beliefs. "Two people out of 15," she said matter of factly. "What do you think would happen if Najibullah Zazi was successful?" she asked, referring to the man who pleaded guilty to plotting to bomb the New York City subway. Intelligence officials have said N.S.A. e-mail surveillance helped them catch Mr. Zazi. "There would be unbridled criticism," she said. Didn't we learn anything? Can't we protect our homeland? What good is intelligence if we can't stop this? So there's a flip side to all this. For those who have worked alongside Ms. Feinstein, her resolve comes as no surprise. She angered Senator Harry Reid of Nevada, the majority leader, this year when she publicly criticized his decision to drop her assault weapons ban from a package of gun control bills. "Show some guts," she implored her colleagues from the Senate floor as they were about to vote her proposal down. She has always had a defiant streak. About a decade ago, Ms. Feinstein decided to add a playful feminist twist to one of the favorite institutions of a colleague then, Trent Lott of Mississippi, who had revived it when he was majority leader: Seersucker Thursday, when male senators wore seersucker suits to honor a Southern sartorial tradition. Ms. Feinstein bought all the female senators seersucker suits of their own.