Judge Neomi Rao, center, is helped into her robes by her children during her official investiture ceremony Friday. (Bill O'Leary/The Washington Post)

Former White House official Neomi Rao was formally sworn in Friday as the newest judge on the federal appeals court in Washington in a ceremony attended by prominent members of the legal community and high-profile figures from the Trump administration, where she once worked.

Former White House counsel Donald McGahn, who recommended Rao for the job and was instrumental in President Trump’s successful judicial nominations, emphasized her diverse experience in government.

“She’s been on the field of play and made tough decisions at the highest levels,” McGahn said, before alluding to Rao’s difficult Senate nomination process. “She stood the test under pressure and adversity.”

Also in attendance were two Supreme Court justices: Brett M. Kavanaugh, whom Rao replaces on the U.S. Court of Appeals for the D.C. Circuit, and Clarence Thomas, for whom Rao was a law clerk.

Thomas, who taught a course with Rao at George Mason University’s law school, praised the judge for her intellect, work ethic and character.

After being sworn in by Thomas, Rao, 46, addressed the standing-room-only courtroom filled by Washington’s interconnected community of lawyers, judges, Justice Department officials and former Supreme Court law clerks.

Former White House Counsel Donald McGahn, who recommended Neomi Rao for the federal appeals bench, makes remarks at the investiture ceremony. (Bill O'Leary/The Washington Post)

Rao, the former White House regulator czar, said she brings to the bench an up-close experience with the “checks and balances at work” and a “practical understanding of the powers and limitations” of the respective branches of government.

She is President Trump’s second nominee on the influential D.C. Circuit. The first, Gregory Katsas, was Trump’s deputy legal counsel and is also a former Thomas law clerk.

The D.C. Circuit is often referred to as the nation’s second-highest court because it reviews high-profile cases involving separation of powers and government regulations, and because it has been something of a pipeline to the Supreme Court.

Rao was officially sworn in during a small ceremony in March and has already been hearing cases. She is one of three judges on the panel that will rule on whether Trump can block Congress from demanding eight years worth of records from his accounting firm.

Members of the legal community and administration officials filled the courtroom. (Bill O'Leary/The Washington Post)

At the Senate in February, Rao encountered resistance, including from Republicans, in part because of her controversial writings about date rape from her time as a college student at Yale in the 1990s. She apologized in a letter to the Judiciary Committee strongly condemning “sexual assault in all forms” — and got support from high places.

Thomas worked behind the scenes, talking privately with at least two GOP senators to vouch for Rao’s credentials.

She was confirmed in March on a vote of 53-46 — a tally that McGahn referred to Friday as a “landslide by modern standards.”

Rao had since 2017 led the Office of Information and Regulatory Affairs, where she worked to significantly scale back federal regulations. She spent a decade before that as a law professor and is a former Senate Judiciary Committee staff member and associate counsel to President George W. Bush.