President Trump's pick to lead the FBI vowed Wednesday that he would not be influenced by political pressure, pledging loyalty to the rule of law and insisting his investigations would be "only driven by the facts.''

"My loyalty is to the constitution and the rule of law, full stop,'' Christopher Wray told the Senate Judiciary Committee, appearing to reject any suggestion that he would entertain efforts by the White House to compromise him.

Trump's previous FBI director, James Comey, has testified that the president pressed him to drop parts of his investigation into possible collusion between the Trump campaign and Russia – and unsuccessfully demanded that Comey pledge him his personal loyalty. Trump abruptly fired Comey on May 9 in the middle of the Russia investigation.

"I believe to my core that there is only one right way to do this job and that is strict independence ,'' Wray told the panel, "without fear without favoritism and certainly without regard to any partisan influence.''

From his opening remarks, the FBI nominee and former assistant attorney general appeared to indicate – without mentioning Trump by name – how he would handle a president who has not always kept the traditional distance between the White House and law enforcement community.

"Anybody who thinks I would pulling any punches as the FBI director surely doesn't know me very well,'' he said.

Wray will not oversee the Russia investigation, which is now led by special counsel Robert Mueller. But Wray pledged to guard the independence of the ongoing inquiry into possible collusion between the Trump campaign and Russia, and said any effort to tamper with the inquiry would be "inappropriate.''

At his confirmation hearing, senators were focused on questions of independence from the next FBI head under the Trump administration.

"The reason Mr. Comey was dismissed was because Mr. Comey would not pledge is loyalty to the president and he wouldn’t lift the cloud of the Russia investigation,'' California Sen. Dianne Feinstein, the panel's ranking Democrat, said in an opening statement. "All of this raises important questions about the next FBI head, about the person’s independence. The FBI director does not serve the president; he serves the Constitution and the law.''

For nearly a decade, the Yale Law School graduate steadily climbed the ranks at the Justice Department, starting as an assistant U.S. attorney in Atlanta and departing in 2005 after serving as the chief of the sprawling Criminal Division in the Washington headquarters.

Perhaps his most public recognition came as the head of the Justice task force that won convictions against executives at former Texas energy giant Enron, whose chief executive Ken Lay, was among President Bush's biggest contributors.

In the aftermath of the 9/11 attacks, Wray also managed far-flung efforts to dismantle terrorist operations as the government worked to gauge the continuing threat against the homeland.

It was during that tense time that the FBI began a dramatic transformation in mission under then-Director Robert Mueller, from an agency that largely investigated crimes after the fact to an intelligence-driven operation aimed at thwarting new attacks against the U.S.

Although Wray's nomination has received bipartisan support, his post-9/11 work at Justice is likely to draw pointed questions from the panel. Faiz Shakir, the ACLU's national political director, has said Wray should be pressed on the Bush administration's harsh treatment of detainees, some of whom were subjected to waterboarding and other torture.

"In this important moment for our country, the American people deserve a commitment from any nominee for FBI director to the foundational principles of our Constitution, and that that commitment outweighs any loyalty to a political party or a single politician,'' Shakir said.

Bill Mateja, a former Justice official who worked with Wray, said he knows of no reason the nomination could be blocked, recalling a colleague who spent long days and nights at the office. A mussed mop of hair and rumpled clothing often betrayed the strain of a demanding schedule. "Sometimes, he would spend the night at the office,'' Mateja said of Wray. "He wouldn't go home until he got it all done – whatever it was,''

The grinding work ethic, associates said, is strikingly similar to the distinctive style – or lack of it – that Mueller brought to the same post he held for 12 years, the longest-serving director since J.Edgar Hoover. In a town full of out-sized personalities, Mueller actively sought to avoid the public spotlight. And Wray appears to be cut from the same mold.

"This is not somebody who is in it to draw attention to himself,'' said Andrew Hruska, a former Justice colleague whose friendship with the nominee dates to their days in grade school in New York. "Chris is used to working in demanding circumstances and keeping his head in difficult times. That said, it's never easy to the the FBI director. Regardless of the political or legal storm, he will not be compromised.''

Still, Wray – if confirmed – is walking into agency that has been buffeted by unrelenting controversy since last year, starting with Comey's decision not to recommend criminal charges against Hillary Clinton for her use of a private email server and then to suddenly re-open the inquiry just 11 days before the 2016 election. The case was closed again without charges just days before Election Day, but Clinton has blamed the former FBI director for tilting the vote to Trump.

More recently, the bureau was left reeling when Trump announced Comey's dismissal in May, later attributing the decision to the director's oversight of the Justice investigation into possible collusion between the Trump campaign and Russia. The firing was followed by disclosures that Comey had kept a secret file of memos chronicling his meetings with Trump, including a February White House encounter in which the president allegedly pressed Comey to drop the bureau's investigation into short-time National Security Adviser Michael Flynn.

The revelations prompted the Justice Department to appoint Mueller as a special counsel.

Wray was not among the first short list of names suggested to replace Comey, but several higher profile candidates withdrew from consideration. Wray seemed an unlikely choice because of his past relationships with both Mueller and Comey, who are both frequent targets of Trump as the special counsel investigation continues.

In advance of Comey's confirmation hearing in 2013, Wray joined nine other former Justice officials in a letter offering effusive support for Comey's nomination.

"He (Comey) has integrity and independence born of his innate sense of what is required of senior public service,'' the letter stated. "He never expects more of anybody else than he expects of himself."

Still, associates said Wray may be uniquely suited to bring calm to an institution that has been roiled by controversy. They cite his experience on both sides of the bar, including his defense of New Jersey Gov. Chris Christie during the so-called "Bridgegate" scandal.

Because Mueller is now overseeing the Russia inquiry, Chris Swecker, a former FBI assistant director, said Wray – if confirmed– could focus on making his way in a new agency.

"He won't be distracted by this political storm that seems to kick up something new every day," Swecker said. "Because he's been gone from Justice for so long, he's kind of an unknown in the bureau. He's going in with the blank slate. He's got a lot of work ahead of him."