Christopher Wray defended America's top law enforcement agency before lawmakers amid public attacks from President Trump on Capitol Hill. His testimony before the House Judiciary Committee on oversight of the FBI came just one week after Mr. Trump's weekend tweets calling the FBI biased, saying its reputation is "in Tatters — worst in History!" and urging Wray to "clean house."

"There is no shortage of opinions out there but what I can tell you is the FBI that I see is tens of thousands of agents and analysts and staff working their tails off keeping Americans safe," said Wray when asked about the president's tweets on Thursday.

Following Mr. Trump's public lambasting of the bureau, Wray sent an internal email to FBI employees amid concerns about morale.

Get Breaking News Delivered to Your Inbox

Wray said he was, "inspired by example after example of professionalism and dedication to justice demonstrated around the Bureau." He told the staff, "It is truly an honor to represent you."

He did not acknowledge the president's criticism but he did write, "We find ourselves under the microscope each and every day -- and rightfully so. We do hard work for a living. We are entrusted with protecting the American people and upholding the Constitution and laws of the United States. Because of the importance of our mission, we are also entrusted with great power, and we should expect -- and welcome -- people asking tough questions about how we use that power. That goes with this job and always has."

Wray echoed that same sentiment at Thursday's hearing.

He called his staff "decent people committed to the highest principles of integrity and professionalism and respect."

"Do we make mistakes? You bet we make mistakes just like anybody who's human makes mistakes," said Wray, applauding the work of independent investigations to keep the FBI accountable.

He went on, saying that the staff of the FBI are "big boys and girls, we understand we'll take criticism from all corners and we're accustomed to that" but it was in his assessment that the FBI's reputation was "quite good."

Asked how exactly he can keep the FBI from ever being in "tatters" as the president claimed, Wray replied, "The best way that I can validate the trust of the American people and the FBI is to ensure we bring the same level of professionalism and integrity and objectivity and adherence to process in everything we do."

Meanwhile, Wray also took Thursday's hearing to provide his assessment on reports surrounding an FBI agent that was removed over allegations of anti-Trump text messages who was responsible for softening language about Secretary Hillary Clinton in the bureau's investigation into her private email server.

Wray told lawmakers that while he agreed with the investigation into the handling of the server as well as the removal of the FBI agent, he said it would not be "appropriate" for him to speculate on the investigation.

"These matters are being looked at as they should be, when those findings come to me I'll take the appropriate action necessary," said Wray. He added that he would "leave it to others to figure out if 'gross negligence' and 'extremely careless' is the same thing."

Here are some of the highlights from the hearing:

Wray on ousted FBI agent in Mueller investigation

At the outset of the hearing, Wray was asked about reports surrounding an FBI agent that was removed over allegations of anti-Trump text messages who was responsible for softening language about Secretary Hillary Clinton in the bureau's investigation into her private email server.

Peter Strzok, who led the investigation into Clinton's use of a private email server while secretary of state, changed the language in former FBI Director James Comey's description of how Clinton handled classified information, according to U.S. officials familiar with the matter.

Strzok had changed Comey's earlier draft language describing Clinton's actions as "grossly negligent" to "extremely careless." That change in wording has significant legal implications, since "gross negligence" in handling classified information can carry criminal penalties.

Wray told lawmakers that while he agreed with the investigation into the handling of the server as well as the removal of the FBI agent, he said it would not be "appropriate" for him to speculate on the investigation.

"These matters are being looked at as they should be, when those findings come to me I'll take the appropriate action necessary," said Wray. He added that he would "leave it to others to figure out if 'gross negligence' and 'extremely careless' is the same thing."

In a back-and-forth with Rep. Darrell Issa, R-California, over the agent removed, Wray answered the Congressman's line of questions if the text messages exchanged were indeed a fireable action.

"Each question would have to be based on its own circumstances, I can imagine situations where it wouldn't be and situations where it might be," Wray said.

He explained however, that the "individual in question has not been dismissed", clarifying that Strzork had been "reassigned away from the special counsel investigation which is different than disciplinary action."

FBI Director on terrorism investigations

Wray told the panel in his opening remarks to lawmakers that there are about 1,000 open domestic terrorism investigations in the U.S. and also about 1,000 open cases related to ISIS.

Over the last year, there have been 176 arrests in domestic terrorism cases, Wray told the committee.

When pressed on domestic terrorism particularly as it relates to any federal investigations of "extremist" groups, Wray explained that the bureau will only investigate acts of terrorism if there is credible information of federal criminal activity, credible information suggesting an attempt of use of force or violence, and use of force or violence in the furtherance of a political goal.

Wray explained that currently the FBI has 50 percent more white supremacist investigations than "black identity extremist" probes at the moment, but "it doesn't matter if they're right wing, left wing or any other wing," said Wray of investigating extremist groups.

He added later that the FBI does not investigate specific "rhetoric or ideology or opinion" but only investigates when it takes that "next step" toward violence.

Wray on Trump's "tatters" Tweets

Meanwhile, on the topic of President Trump, when asked if Director Wray was ever given a "loyalty oath" similar to that of Former FBI Director James Comey or if he was ever asked to "side step the chain of command", the director replied, "no."

Wray also said Mr. Trump has not spoken to him about special counsel Robert Mueller's investigation into potential collusion or communications between Russia and the Trump campaign.

But when questioned on Mr. Trump's tweets denouncing the bureau he leads, Wray delivered an impassioned speech in defense of his staff.

"There is no shortage of opinions out there but what I can tell you is the FBI that I see is tens of thousands of agents and analysts and staff working their tails off keeping Americans safe," said Wray.

He called his staff "decent people committed to the highest principles of integrity and professionalism and respect."

"Do we make mistakes? You bet we make mistakes just like anybody who's human makes mistakes," said Wray, applauding the work of independent investigations to keep the FBI accountable.

He went on, saying that the staff of the FBI are "big boys and girls, we understand we'll take criticism from all corners and we're accustomed to that" but it was in his assessment that the FBI's reputation was "quite good."

Asked how exactly he can keep the FBI from ever being in "tatters", Wray replied, "The best way that I can validate the trust of the American people and the FBI is to ensure we bring the same level of professionalism and integrity and objectivity and adherence to process in everything we do."

Wray went into his opinions on the president's tweet, saying "I'm not really a Twitter guy" and that he has no plans to ever tweet or ever "engage in tweets."

Wray on Mueller and Comey

Director Wray called Former Director Comey a "smart lawyer" and a "dedicated public servant" when he worked with him in the early 2000's. He said he enjoyed working alongside Comey on anti-terrorism endeavors and said all experiences with comey were "positive" but has since lost touch with the former director.

On Special Counsel Robert Mueller, he sad in his experience, Mueller is "very well respected within the FBI."