The Department of Justice on Friday announced that it has voluntarily withdrawn a lawsuit challenging North Carolina's controversial House Bill 2.

The lawsuit was filed last year by former Attorney General Loretta Lynch.

House Bill 2 was approve by Republican leaders during a one day special session. It blocked cities and municipalities from enacting LGBT protections and was the first state law to prohibit transgender people from using the bathroom of their choice in many buildings.

Late last month, Democratic Governor Roy Cooper signed a compromise deal to repeal House Bill 2. The new law, House Bill 142, repeals House Bill 2, but it also leaves bathroom regulation to the state and enacts a moratorium on local LGBT ordinances until December 1, 2020.

(Related: NC's Roy Cooper signs deal to repeal anti-LGBT law.)

The Justice Department, which is now headed by Attorney General Jeff Sessions, cited the new law in announcing its decision.

“In light of the passage of North Carolina Session Law 2017-4, House Bill 142, and pursuant to Fed. R. Civ. P. 41, the Parties in the above-captioned action hereby stipulate that all claims or causes of action against Defendants and all counterclaims against Plaintiff which were the subject matter of this lawsuit are hereby dismissed with prejudice,” the department said in a 5-page notice.

Lynch argued in the lawsuit that House Bill 2 violated Title VII of the Civil Rights Act of 1964, Title IX of the Education Amendments of 1972 and the Violence Against Women Reauthorization Act of 2013.

Jon W. Davidson, legal director at Lambda Legal, said in a statement that the Trump administration and Sessions were using the “fake repeal of HB2 as cover” to withdraw the government's support for transgender people.

“Sadly, this was not unexpected, now that anti-transgender forces are in charge of the Departments of Justice and Education,” Davidson said. “Once again, the Trump administration continues to abandon transgender Americans.”

A separate lawsuit filed by the American Civil Liberties Union, the ACLU of North Carolina and Lambda Legal will continue. The groups said they will amend their challenge to include House Bill 142.