The U.S. Department of Justice will no longer battle with the state of North Carolina over its policies regarding transgender residents.

On Friday morning, the Justice Department and attorneys for North Carolina filed a joint notice of dismissal at the U.S. District Court in North Carolina, stating in the document they were withdrawing both cases "in light of the passage" of House Bill 142, the bill that replaced the controversial House Bill 2 (better known as HB2).

The North Carolina state House debates on the floor of the state House prior to a vote on HB 142 on March 30, 2017, in Raleigh, N.C. Brian Blanco / AP file

The Obama-era Justice Department, led by Loretta Lynch, sued North Carolina and then-governor Pat McCrory last May after the state passed a law barring transgender people from using restrooms and other private facilities that matched their gender identity rather than the sex on their birth certificate.

The controversial law was passed in March 2016, and sparked instant national protests. HB2 banned local towns and municipalities from passing non-discrimination laws, prevented them from raising the minimum wage and mandated that transgender people use restrooms that match the sex on their birth certificate.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In May, the federal government and North Carolina filed dueling lawsuits against each other on the same day. Both of those lawsuits were dismissed with Friday's filing.

Both parties pulled out of the legal battle because HB2 was repealed on April 2 and replaced with HB142, a similar but slightly less discriminatory bill. The new law, signed by current governor Roy Cooper, retains the ban on local non-discrimination ordinances and puts control over bathroom access in the hands of state legislators.

LGBTQ advocates were outraged by what they called a "fake repeal."

“The Trump Administration may want to use the fake repeal of HB 2 as an excuse to further turn their backs on the transgender community, but the rest of us aren’t going to give up that easily,” said James Esseks, director of the ACLU’s LGBT Project. “We’ll continue this fight as long as it takes to truly strike down this disastrous law for good.”

When the federal suit was filed last May, Attorney General Loretta Lynch famously spoke out in favor of transgender rights.

"What we must not do, what we must never do, is turn on our neighbors, our family members, our fellow Americans, for something that they cannot control and deny what makes them human," Lynch said at a May press conference. "And this is why none of us can stand by when a state enters the business of legislating identity and insists that a person pretend to be something or someone that they are not."

"We see you, we stand with you, and we will do everything we can to protect you going forward," Lynch said in the statement.

Today's notice of dismissal was signed by T.E. Wheeler, Acting Assistant Attorney General of the Justice Department's Civil Rights Division, as well as North Carolina U.S. Attorney Sandra Hairston. It was also signed by attorneys for Governor Roy Cooper's office, the state of North Carolina, and the University of North Carolina.

The Justice Department declined to comment further on Friday.

Follow NBC Out on Twitter, Facebook and Instagram