The Commonwealth of Virginia asked a federal judge late Wednesday night to force President Donald Trump, U.S. Customs and Border Protection and top government officials to show why they shouldn’t be held in contempt for failing to obey a lawful court order.

The temporary restraining order issued Saturday night by U.S. District Judge Leonie Brinkema of the Eastern District of Virginia required Customs and Border Protection to allow attorneys access to legal permanent residents that CBP had detained at Dulles International Airport as a result of Trump’s executive order blocking people from seven Muslim-majority nations from traveling to the U.S. Saturday’s court order also forbade CBP from deporting any of the legal permanent residents ― also known as green-card holders ― detained at Dulles for seven days.

When federal judges rule against the government, any official implicated in the order, including the president, is supposed to obey ― even if they believe the court’s order is incorrect.

But as The Huffington Post reported this weekend, CBP did not comply with the court’s order. The border agency never let attorneys near the people it was detaining. And when Sen. Cory Booker (D-N.J.), Rep. Don Beyer (D-Va.) and at least four other members of Congress tried to get CBP to comply at various points over the weekend, CBP defied them.

In addition to Trump and CBP, the Department of Homeland Security, DHS chief John Kelly, acting CBP Commissioner Kevin K. McAleenan, Dulles CBP head Wayne Biondi and eight unnamed CBP agents are defendants in the new lawsuit. Their “conduct and refusal to account for their actions last weekend suggests disobedience” to the court’s order, Virginia charged in its brief.

“A president can be held in contempt of court. UCLA law professor Adam Winkler

The case originated on Friday, when Virginia civil rights attorneys sued on behalf of green card holders who were detained at Dulles soon after Trump’s executive order was signed. Brinkema issued her temporary restraining order Saturday. Virginia intervened in the case on Tuesday, arguing that CBP and the other defendants may have violated the rights of legal state residents by deporting them and forcing them to sign papers giving up their rights to live in the country, and it filed the contempt motion late Wednesday. A hearing on the contempt issue, which could prove to be a significant showdown between a Democratic-controlled state and the Republican-led federal government, is scheduled for Friday morning.

“A president can be held in contempt of court,” Adam Winkler, constitutional law expert and law professor at UCLA, told The Huffington Post. “President Clinton was held in contempt of court in 1999 over his false testimony in the Monica Lewinsky scandal. The truly remarkable question we find ourselves asking is whether Trump will follow a court order. Clinton did. But Trump seems to snub his nose at anyone who opposes him. “

In an affidavit in support of the contempt motion before Judge Brinkema, Beyer described the chaos that he and his congressional colleagues witnessed when he arrived at Dulles. Beyer said he met with “anxious, grief-stricken” families who were confused by the actions of customs officials. Alarmed, Beyer said, he attempted to speak to CBP staff on site but was denied access to customs officials by Dulles police who told Beyer that they “were under orders not to allow anyone to make contact with CBP.” Beyer said he then asked the deputy police chief to request that customs officials meet with him and his colleagues to get assurances that CBP would comply with the temporary restraining order issued by federal court. CBP did not respond to their request, he said.

Beyer said that CBP’s continued non-compliance with the court’s order and the turning away of members of Congress amounted to “a constitutional crisis.”

“I am now of the belief that, though this was issued by the judicial branch, that it was violated tonight,” Booker said Saturday night, according to reporting by the Daily Beast’s Betsy Woodruff, who’s cited in Virginia’s legal brief. “And so one of the things I will be doing is fighting to make sure that the executive branch abides by the law as it was issued in this state and around the nation. This will be an ongoing battle .... I believe it’s a constitutional crisis, where the executive branch is not abiding by the law.”

On Sunday, Virginia Attorney General Mark Herring sent a letter, also submitted to the District Court on Wednesday, to top federal and state officials in which he expresses deep concern about the events at Dulles over the weekend.

“I am particularly troubled that Virginia residents were detained, or returned to the country from which their travel originated, despite having been previously issued lawful permanent residence status or lawful student or work visas,” Herring wrote.

Herring has asked customs to tell his office how many Virginia permanent residents and people with student or work visas were detained at the airport and why lawyers were denied access to the detained travelers by CBP officials. He is also asking for the total number of people deported and how many were eventually permitted entry. Herring asked for the information to be delivered by Wednesday.

The letter was sent to DHS Secretary Kelly; Dana Boente, U.S. attorney for the Eastern District of Virginia; CBP acting Commissioner Kevin McAleenan; and Wayne Biondi, port director of Washington. None of them answered the Virginia officials’ questions by Wednesday. On Tuesday night, Trump named Boente acting attorney general of the United States.

Trump’s executive order, issued Friday, temporarily bans all refugees and indefinitely bars Syrian refugees. The order also suspends travel to the U.S. by citizens of seven countries: Iraq, Iran, Libya, Sudan, Somalia, Syria and Yemen. The policy, which affects 218 million people, sparked chaos and protests at many U.S. airports as travelers from the targeted countries were detained and lawyers were kept from speaking with detainees.

The Department of Justice, which represents the United States and U.S. officials in suits against the government, declined to comment. But Trump is unlikely to face consequences for his administration’s failure to comply with the court order, according to one legal expert.

“There’s no indication that the court is going to actually hold the president in contempt,” said Ben Feuer, chairman of the California Appellate Law Group and a former clerk on the U.S. 9th Circuit Court of Appeals. “The people who are really at the center of this, who this is actually directed at, are the agents at Dulles airport involved in this.... Here’s what’s at stake: How’s the court going to force these officers or punish them?... You could conceive of a situation where the court orders the U.S. marshals to confront these officials and arrest them, the president fires the marshals and hires new officials who will not obey the court order, and then you likely have a constitutional crisis.”

This story has been updated to note that the DOJ declined to comment.

Sign up for the HuffPost Must Reads newsletter. Each Sunday, we will bring you the best original reporting, long form writing and breaking news from The Huffington Post and around the web, plus behind-the-scenes looks at how it’s all made. Click here to sign up!