Updated at 1:35 p.m. ET

FBI Director Christopher Wray headed to Capitol Hill on Thursday and defended his agency publicly for the first time since President Trump denigrated it on Twitter last weekend.

"There is no shortage of opinions out there," Wray told the House Judiciary Committee. "What I can tell you is the FBI I see is tens of thousands of agents and analysts and staff working their tails off to keep Americans safe from the next terrorist attack; gang violence; child predators; spies from Russia, China, North Korea and Iran."

"The FBI I see," Wray added, "is tens of thousands of brave men and women who are working as hard as they can to keep people that they will never know safe from harm."

That description is a far cry from how the president described the agency on Sunday, when he said "its reputation is in Tatters — worst in History!" in a tweet.

Those comments from Wray — and his split from Trump about the reputation and standing of the FBI — set the tone for a hearing, like many others this year, starkly divided along party lines.

Republican lawmakers intensely focused on revelations that came to light last week about Peter Strzok, a high-ranking FBI agent who worked on both the Hillary Clinton email probe under former FBI Director James Comey and the Department of Justice Russia investigation, whose anti-Trump text messages led him to be removed from special counsel Robert Mueller's investigative team over the summer.

Rep. Jim Jordan, R-Ohio, said that if every member of Mueller's team who was "anti-Trump" were kicked off the investigation, "I don't know if there'd be anyone left." Therefore, Jordan suggested that there had to be more going on with Strzok that was not yet known publicly — or even, in a more confidential or secure setting, known yet to members of Congress.

Rep. Steve Chabot, R-Ohio, among others, specifically mentioned the fact that Strzok had a hand in adjusting former FBI Director James Comey's statement last summer about Hillary Clinton's email server. As CNN reported, Strzok changed Comey's key description of Clinton's actions from "grossly negligent" to "extremely careless."

"The depths of this anti-Trump bias on the Mueller team just goes on and on," said Rep. Chabot. "It's absolutely shocking."

Democrats, however, sought to focus on Trump's comments and actions, and the actions of members of his campaign last year. They repeatedly gave Wray an opportunity to dispute the president's portrayal of the FBI as an agency "in tatters."

"My experience has been that our reputation is quite good," Wray said, responding to questioning from Rep. Sheila Jackson Lee, D-Texas.

As NPR Justice Correspondent Carrie Johnson has reported, Mueller is a Republican who has been tapped by both Democratic and Republican presidents over the years to do very important work.

Wray also faced questions about potential legal trouble for Trump personally arising from Mueller's investigation.

Details from the charging documents related to former national security adviser Michael Flynn's plea deal and Trump's recent tweets have given fresh life to questions about obstruction of justice related to the president's decision to fire Comey, Wray's predecessor.

Wray, however, repeatedly deflected questions about whether Trump's decision would put him in legal jeopardy.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.