TRENTON, N.J. (AP) — A federal judge on Thursday denied Democratic Rep. LaMonica McIver’s motions to toss out a prosecution against her stemming from a visit to an immigration detention center this year.

U.S. District Judge Jamel Semper also said he would reserve judgment on one of the New Jersey congresswoman’s motions to toss the case brought by acting U.S. Attorney Alina Habba, who was President Donald Trump’s former personal attorney.

McIver sought to dismiss the case against her on the grounds that her visit to Newark’s Delaney Hall immigration detention center in May was protected on the grounds of constitutional legislative immunity as well as selective and vindictive prosecution.

Semper wrote that the congresswoman failed to show the prosecution was vindictive and that her actions were “wholly disconnected” from the oversight she was conducting as a member of Congress.

The case is a high-profile clash between Trump’s second administration and a Democratic lawmaker who has been sharply critical of the president’s policies. McIver has pleaded not guilty and vowed to continue her work as a lawmaker.

McIver charged by Habba, a Republican, after the May 9 visit to Delaney Hall. Immigration and Customs Enforcement uses the privately owned, 1,000-bed facility as a detention center.

McIver was indicted in June on three counts of assaulting, resisting, impeding, and interfering with federal officials. Two of the counts carry a maximum sentence of up to eight years in prison. The third is a misdemeanor with a maximum punishment of one year in prison.

Video evidence released by the Department of Homeland Security shows her at the facility during a protest, shortly before Newark Mayor Ras Baraka’s arrest. Judge Semper noted that video footage confirms McIver was in a chaotic situation, which complicated the understanding of her alleged actions.

Members of Congress hold rights to access federal immigration facilities under oversight powers, supported by a 2019 appropriations bill.

Rep. McIver was elected to her post in September during a special election, following the passing of her predecessor Rep. Donald Payne Jr. She was subsequently elected to a full term in November.