WASHINGTON — House Speaker Nancy Pelosi and congressional Democrats on Wednesday blasted Attorney General William Barr for testifying that the government spied on Donald Trump's presidential campaign.

"I'm flabbergasted by the attorney general's comments. I don't get it," Sen. Mark Warner, D-Va., ranking member on the Senate Intelligence Committee, told reporters at the Capitol.

"When you start linking spying with law enforcement or the intelligence community, that sets off red flags everywhere," Warner added. "And that's why I think he does a disservice to the men and women who work in the Department of Justice and the FBI, who if they had not started a counterintelligence investigation into Russia's intervention in the 2016 election, they would be skewered and rightfully so."

The Democrats lashed out after Barr told a Senate subcommittee that he believes "spying did occur" by the U.S. government on Trump's campaign. Barr said he had a basis for his belief although he declined to disclose it to lawmakers, but no hard evidence that anything improper had occurred; he added that it was a matter he needed to review.

Rep. Adam Schiff, D-Calif., chairman of the Intelligence panel, told NBC News he was "deeply disturbed" by Barr's comments and that he had never heard any Department of Justice or FBI official allege that the intelligence community had spied on the Trump campaign. He said that invoking such strong language not only undermines the work of the intelligence community, but also helps strengthen "deep state" conspiracy theories.

"Spying is a loaded term. The attorney general is smart enough to know that it's a loaded term," he said.

Later in his testimony, under further questioning, Barr used the phrase "unauthorized surveillance."

Pelosi, D-Calif., also weighed in, telling reporters, "It is very dismaying and disappointing that the chief law enforcement officer in our country is going off the rails yesterday and today. He is the attorney general of the United States of America, not of Donald Trump."

Sen. Richard Blumenthal, D-Conn., called on Barr to "retract his unfounded, irresponsible claim" that U.S. law enforcement spied on Trump's campaign, and demanded he apologize.

"The only spies interfering in the 2016 campaign were Russian ones," Blumenthal said. "As Attorney General Barr himself admitted, there is absolutely no evidence that our nation's own law enforcement officers did anything unlawful during their investigation into Russian meddling in our democracy. To recklessly suggest otherwise is deeply offensive — and worse, it is dangerous."

In a tweet, Sen. Jack Reed, D-R.I., who also attended the hearing, called Barr's comments “inaccurate, irresponsible, & without evidence."

During Barr's testimony, he declined to elaborate when Sen. Jerry Moran, R-Kansas, chairman of the panel, asked what the basis was for his remarks about spying.

"There is a basis for my concern, but I'm not going to discuss the basis," Barr said.

"I'm not saying if improper surveillance occurred," he added later when asked to clarify — saying only that he was "concerned about it" and looking into the situation.