"After years of Comey, with the phony and dishonest Clinton investigation (and more), running the FBI, its reputation is in Tatters - worst in History!"
House Judiciary Committee ranking member Jerry Nadler asked Wray to respond to this tweet during an oversight hearing.
Democrats, however, sought to focus on Trump's comments and actions, and the actions of members of his campaign a year ago. Jerold Nadler of NY, the ranking member of the committee, and Sheila Jackson Lee of Texas - asked about Trump's tweet.
"The FBI that I see is tens of thousands of courageous men and women who are working as hard as they can to keep people that they will never know safe from harm", Wray said before the House Judiciary Committee.
"The FBI that I see is tens of thousands of courageous men and women", he continued.
His defence of the FBI came after the committee's chairman, Republican Representative Bob Goodlatte, said he was concerned by reports about Peter Strzok, a veteran counterintelligence agent involved in the Hillary Clinton investigation, being removed from Mr Mueller's team last summer following the discovery of text messages seen as potentially anti-Trump. Press Secretary Sarah Huckabee Sanders said Trump agrees field agents are "appreciated and respected", but said the president's "issues are with the political leaders in the Federal Bureau of Investigation under former director Comey, particularly those that played politics with the Hillary Clinton email probe". "But fear not, we will bring it back to greatness".
"Even the appearance of impropriety will devastate the FBI's reputation".
"The FBI I see is reflected in folks like the new class of agents I swore in in Quantico two days ago", he said. "Decent people committed to the highest principles of integrity and professionalism". "People like the hostage rescue team and SWAT teams that we send out into all sorts of danger with nearly no notice".
Since he was sworn in on August 2, the U.S. has experienced two of the deadliest shootings in its modern history and an attack seen as terrorism in Manhattan. We understand that we will take criticism from all corners. You bet we make mistakes. "And when that independent fact finding is complete, we will hold our folks accountable if that is appropriate".
Wray, who served as a top Justice Department official under President George W. Bush and was nominated as FBI director by Trump, has faced Republican criticism over perceived political bias in special counsel Robert Mueller's probe of possible Trump campaign ties to Russian Federation during the 2016 presidential election and in the handling a year earlier of an FBI investigation into Hillary Clinton's use of a private email server that ended without criminal charges.
"And we are accustomed to that", he said, adding, "My experience has been that our reputation is quite good".