has been formally installed as the new FBI director.
He replaces, who was fired in May by President Donald Trump after fewer than four years on the job.
The ceremony at FBI headquarters on Thursday was notable because neither Comey nor Robert Mueller, who preceded him as FBI director, was present.
Mueller is now leading a Justice Department investigation into potential coordination between the Trump campaign and Russia to influence the 2016 presidential election. As part of that probe, he and his team of investigators are looking into the circumstances of Comey's firing.
In remarks shortly after the swearing-in ceremony, Wray acknowledged the FBI's string of controversies as of late, telling audience members that the bureau's history "is our foundation" but that it "hasn't come without missteps or errors."
"We take those mistakes and learn from them. We get better at learning what we need to do to get better," said Wray.
Wray also charged the bureau to continue to work diligently even in the face of continuing threats.
He added, "It's a pattern I've seen throughout my career. The more dire, the more daunting circumstances, the more the bureau rises to the occasion. That's what defines your character as members and a team. Hard work, dedication, commitment. The very qualities on our shield: fidelity, bravery, and integrity."
Attorney General Jeff Sessions also delivered remarks, hailing Wray as a "great leader."
"He is right for the time. He is warm, thoughtful, reasoned, but without a doubt he will be great in charge. He will emphasize integrity. I have seen him do it. He is truly honored to be part of this great organization. You can feel it when you talk to him," said Sessions.
Wray was a former high-ranking Justice Department official during the George W. Bush administration. The Senate confirmed Wray as Mr. Trump's choice to replace Comey as head of the FBI in August, overwhelmingly approving the director in a 92-5 vote.