Attorney General Jeff Sessions, left, FBI Director Christopher Wray and his wife, Helen Wray, attend Wray's installation ceremony at FBI headquarters Thursday. (Chip Somodevilla/Getty Images)

The ceremony installing Christopher A. Wray as FBI director went off without a hitch Thursday — and without the traditional presence of the president and Wray’s immediate predecessors.

Wray took over as director of the FBI in August, but Thursday in the courtyard of FBI headquarters, he was formally sworn in.

While a number of current and former law enforcement officials attended, the installation ceremony was most notable for its no-shows — which included President Trump and former directors James B. Comey and Robert S. Mueller III. The president would normally make remarks, and the director’s predecessors would be in the front row of the audience. That’s what happened at the last such event, held for Comey in 2013.

But under the current circumstances that would have made for an in­cred­ibly awkward public moment. The FBI is investigating the president’s interactions with Comey and others as part of the probe into whether Trump associates may have coordinated with agents of the Russian government to influence the 2016 presidential election.

The selection of Wray to be the new FBI director only came about because Trump fired Comey in May, a move which led shortly after to the appointment of Mueller as special counsel overseeing the probe.

None of the speakers referred directly to the Russia probe, but its shadow seemed to hang over the 45-minute proceeding on a sunny afternoon.

In its way, the event was a physical manifestation of the unusual amount of distance the FBI now has from the White House because of the investigation. The most senior administration official in attendance was Attorney General Jeff Sessions, who has recused himself from the Russia probe.

Sessions called Wray a “brilliant’’ attorney dedicated to the rule of law. Many of his comments praising Wray, though, could also be taken as an implicit critique of Comey, whose ouster Sessions helped engineer.

“Nothing is more important to me, you have to know, than ensuring that this nation has a director of the FBI of the highest quality,’’ Sessions said. “You can know we have spent time — [Deputy Attorney General] Rod Rosenstein and I and others have worked on this evaluation — and I was so pleased, thrilled really, to recommend to President Trump that he be nominated to be your director.’’

Sessions played a key role in the firing of Comey — discussing the matter beforehand with the president, and then recommending the director's removal less than four years into Comey's 10-year term.

“A director must know it is not about him, but about security and justice, and most of all, law,’’ said Sessions. “Director Wray meets that test in full.’’

The attorney general finished his remarks with a warning, of sorts: “In the days to come, Chris, there’ll be many controversies. There seem to be a lot of them these days, but they’ve always been out there. It is the nature of the job, I suppose.’’

When it was his turn to speak, Wray mentioned his predecessor Comey — in listing the previous seven people who have been confirmed as FBI director. He praised the great traditions of the FBI but noted that its history “hasn’t come without missteps, it hasn’t come without errors in judgment.’’

Hundreds of FBI employees and relatives gathered in the courtyard to watch the ceremony, and hundreds more watched from the building’s upper floors.

“Our mission is simple, but profound — to protect the American people and uphold the Constitution,’’ Wray said. “That mission hasn’t changed, and it won’t change, not as long as I have anything to say about it.’’