An Obama-era Justice Department chief took issue with Attorney General William Barr saying Wednesday that "spying did occur" on President Trump's 2016 campaign.

"When there is a predicate, a legitimate basis, it’s called 'investigating' not 'spying'. I am confident that the people at DOJ/FBI conducted themselves in an appropriate way. No evidence to suggest otherwise," Eric Holder tweeted.

Holder, who served as attorney general from 2009-2015, was reacting to a tweet from Matthew Miller, a Justice Department spokesman under President Barack Obama. "Just an outrageous thing for the AG to say. First, there is zero evidence of this. Second, it's under investigation by the DOJ IG and he should wait until that's done. Third, how about defending the people who work for him rather than repeating right-wing conspiracy theories?" Miller said.

When there is a predicate, a legitimate basis, it’s called “investigating” not “spying”. I am confident that the people at DOJ/FBI conducted themselves in an appropriate way. No evidence to suggest otherwise. https://t.co/15QDByxKgM — Eric Holder (@EricHolder) April 10, 2019

During Senate testimony earlier in the day, Barr was prompted to speak about the team he is putting together to look into the origins of an FBI counterintelligence investigation into Trump's 2016 presidential campaign.

"I think spying did occur. But the question is whether it was predicated — adequately predicated," Barr testified. "I'm not suggesting it wasn't adequately predicated, but I need to explore that. I think it's my obligation. Congress is usually very concerned about intelligence agencies and law enforcement agencies staying in their proper lane."

"I think spying on a political campaign is a big deal. It's a big deal," Barr added, an apparent reference to GOP allegations that the FBI misled the Foreign Intelligence Surveillance Court to monitor Trump 2016 campaign foreign policy adviser Carter Page.

Reacting to Barr's testimony, House Judiciary Committee Chairman Jerry Nadler suggested he was misled and demanded answers. "These comments directly contradict what DOJ previously told us. I’ve asked DOJ to brief us immediately. In the meantime, the AG still owes us the full Mueller report. #ReleaseTheReport," Nadler, D-N.Y., tweeted.

[Also read: Washington Post 'conservative' writer demands Barr be impeached]