WASHINGTON — Breaking with the president, the lawyer Donald Trump picked to lead the FBI declared Wednesday that he does not believe a special counsel investigation into possible coordination between Russia and the Trump election campaign is a "witch hunt."

Christopher Wray, the former high-ranking Justice Department official whom Trump nominated last month, also told senators at his confirmation hearing that he would never let politics get in the way of the bureau's mission.

The FBI's work will be driven only by "the facts, the law and the impartial pursuit of justice," he said, asserting his independence. "My loyalty is to the Constitution and the rule of law. They have been my guideposts throughout my career, and I will continue to adhere to them no matter the test."

Trump has repeatedly derided as a "hoax" and a "witch hunt" an ongoing investigation by the FBI and Robert Mueller, the former FBI director selected in May as the special counsel to oversee the probe.

Wray, selected for the FBI job last month after Trump fired James Comey, made clear that he disagreed with the characterization.

"I do not consider Director Mueller to be on a witch hunt," he said under questioning from Republican Sen. Lindsey Graham of South Carolina.

He pledged to lead the FBI "without regard to any partisan political influence" and said he would consider unacceptable any efforts to interfere with Mueller's investigation.

After Trump dismissed Comey on May 9, the ex-FBI director said that the president had asked him to pledge his loyalty during a dinner at the White House months earlier. He also said Trump had encouraged him to end an investigation into the former national security adviser, Michael Flynn. Wray said Trump made no demand for loyalty from him, and he would not offer it if asked.

Wray, 50, would inherit the nation's top law enforcement agency at a particularly challenging time, given the abrupt dismissal of Comey by a president who has appeared insensitive to the bright-line boundary between the White House and the FBI. Yet the hearing, the first public window into Wray's views since his selection, was largely devoid of fireworks in keeping with what friends and supporters have described as the nominee's low-key and disciplined style.

He appeared to have bipartisan support from senators.

The back-and-forth with lawmakers on Wednesday focused extensively on the Russia investigation, with Wray repeatedly voicing his respect for Mueller and his work. He said he had no reason to doubt the assessment of intelligence agencies that Russia had interfered in the U.S. election through hacking.

And when asked about emails released a day earlier showing that Donald Trump Jr. was willing to take help from the Russian government during the campaign, he was emphatic that any foreign efforts to meddle in an election should be reported to the FBI rather than accepted.

Wray, who most recently has enjoyed a lucrative legal career at an international law firm, also faced questions about his work as a top Justice Department official in the Bush administration. He served the government at a time when harsh interrogation techniques were approved within the Justice Department for terror suspects captured overseas, though Wray said he was never involved in signing off on those methods.

Although Trump as a candidate professed support for waterboarding, Wray said he considered torture to be wrong and ineffective. "The FBI is going to play no part in the use of any techniques of that sort," he said.

He was questioned about his relationships with Comey and Mueller. Trump allies have said Mueller's closeness to Comey shows he can't lead an unbiased probe. But Trump nominated Wray despite his having worked with both men in the Justice Department.

Wray was at the department in 2004 when Comey, temporarily serving as acting attorney general in place of the ailing John Ashcroft, was prepared to resign during a dispute with the White House over the reauthorization of a domestic surveillance program. Wray said he, too, was willing to resign along with Comey and other Justice Department officials — not because he knew the substance of the dispute but because of the quality of the people who were prepared to leave.

"Knowing those people and having worked side-by-side with those people... there was no hesitation in my mind as to where I stood," he said.

Those who know him say that unlike the outspoken Comey, Wray would be a more reserved leader. His mild-mannered style could bode well for the agency at a time when its work has been thrust into the center of a political maelstrom.

He has deep experience in Washington, having served as head of the Justice Department's criminal division in the Bush administration, a position that had him overseeing major criminal prosecutions — such as the special task force investigating the Enron collapse — and also developing the U.S. government's legal response to terrorism and national security threats.

Over the past decade, he has worked in private practice at King & Spalding in Atlanta, where he's defended large corporations and financial institutions in criminal and civil cases.

He provided legal services to Johnson & Johnson, Wells Fargo, Credit Suisse and fantasy sports providers DraftKings and FanDuel, among other big-name clients, according to ethics documents released Monday. If confirmed, he'll have to step aside for a year from matters involving those clients and the law firm. He also assisted New Jersey Gov. Chris Christie during the so-called Bridgegate scandal.