Chief Justice John Roberts was seen rubbing elbows with the architects of Trump's 'travel ban' just hours before the Supreme Court was set to hear arguments about the ban's legality.

The Supreme Court will hear one of the most anticipated — and contentious — cases of Trump’s presidency on Wednesday, as the administration attempts to defend the legality of Trump’s so-called “travel ban” blocking citizens of several Muslim-majority countries from entering the United States.

The ban is currently in its third iteration, and it heads to the Supreme Court after a losing streak in the lower courts, with judges from coast to coast ruling that the policy is illegal or unconstitutional.

With such a controversial and consequential case looming, all eyes are on the court — and on the justices who will begin hearing arguments Wednesday morning. That’s why eyebrows were raised Tuesday evening when Chief Justice John Roberts was spotted at the first state dinner of Trump’s presidency.

While it’s not unusual for Supreme Court justices to attend state dinners, it is unusual for state dinners to be held on the eve of such monumental court cases, making Roberts’ decision to attend a questionable one.

As a guest at the dinner, Roberts was rubbing elbows with the architects of the policy that will be argued in court Wednesday — giving the appearance of potential impropriety, particularly if the court comes down with a ruling in favor of the Trump administration.

With Trump’s attacks on the judicial branch already eroding public confidence and undermining the integrity and independence of the judiciary, even the appearance of impropriety has the potential to further diminish public trust in the courts and the rulings they hand down.

That’s why the Code of Conduct for United States Judges specifies that judges “must avoid all impropriety and appearance of impropriety” and should not “permit others to convey the impression that they are in a special position to influence the judge.”

“An independent and honorable judiciary is indispensable to justice in our society. A judge should maintain and enforce high standards of conduct and should personally observe those standards, so that the integrity and independence of the judiciary may be preserved,” the Code of Conduct states.

“Adherence to this responsibility helps to maintain public confidence in the impartiality of the judiciary. Conversely, violation of this Code diminishes public confidence in the judiciary and injures our system of government under law.”

Unlike the lower courts, the conservative-leaning Supreme Court has sided with Trump previously and allowed most of his ban to take effect. While it remains to be seen what will ultimately come of Wednesday’s oral arguments, Roberts’ decision to attend a black-tie affair with the architects of the policy on the eve of its day in court will undoubtedly raise questions about his impartiality — or lack thereof.