Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

By Pete Williams, Elisha Fieldstadt, The Associated Press and Halimah Abdullah

The Department of Justice has filed its own lawsuit and upped the ante in a fight between the federal government and North Carolina's governor in the legal battle over the state's law regarding access to bathrooms.

In the suit, the Justice Department said the law "stigmatizes and singles out transgender employees, results in their isolation and exclusion, and perpetuates a sense that they are not worthy of equal treatment and respect."

Attorney General Loretta Lynch delivered a statement that recalled reactions to moments in history such as ending Jim Crow laws that enforced segregation, Brown v. Board of Education — which codified ending separate education for white and black students and state bans on same sex marriage. The similarities, she said, speaks to periods in which states had discriminatory responses to broader social change.

This is more than a fight over bathrooms, she said.

"This is about the dignity and respect that we accord our fellow citizens and the laws we have enacted as a country to protect them and to protect us," Lynch said.

The state's Gov. Pat McCrory turned up the heat earlier Monday and filed a lawsuit against the federal government.

We’re taking the Obama admin to court. They're bypassing Congress, attempting to rewrite law & policies for the whole country, not just NC. — Pat McCrory (@PatMcCroryNC) May 9, 2016

It was the state's response to the U.S. Justice Department, which last week gave Gov. Pat McCrory until the end of the day Monday to respond to a letter that said the law violates federal civil rights statutes.

Monday's lawsuit called the Justice Department's legal position "a baseless and blatant overreach" and a radical reinterpretation of federal laws — especially the Civil Rights Act's ban on sex discrimination.

"Transgender status is not a protected class" under the law, the lawsuit said, and if the Justice Department believes it should be, the feds should ask Congress to change the law.

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

“The Obama administration is bypassing Congress by attempting to rewrite the law,” McCrory said during a briefing Monday.

McCrory added that he “wholeheartedly” supports fighting discrimination. “I want to ensure the people of our state and our country, North Carolina has long held traditions of equality,” he said.

In a written statement Monday, McCrory said he was acting to ensure that the state continues to receive millions of dollars in federal aid to public schools and the University of North Carolina.

White House Press Secretary Josh Earnest said in response to the lawsuit that President Barack Obama has “spoken powerfully to the idea (that the law) is inconsistent with values of fairness and equality and justice.”

If the federal government yanked funding, the 17-campus UNC system could lose more than $1.4 billion in public money.

Another $800 million in federally backed loans for students who attend the public universities also would be at risk.

McCrory hired two private law firms to draft and file the suit. North Carolina's attorney general, Roy Cooper, said earlier he would not defend the bathroom law in court. Cooper is running against McCrory in the governor's bid for re-election.

Related: Justice Department Says N.C. Law Violates Civil Rights

The lawsuit avoided any mention of a separate provision of the Civil Rights Act that bars sex discrimination by public schools. A federal appeals court ruled last month that the law prohibits discrimination against transgender students.

The appeals court said public schools must allow transgender students to use the bathrooms that match their gender identity. The ruling came in a lawsuit brought by a high school student in Virginia.

That decision is binding on the five states of the Fourth Circuit, which includes North Carolina.

The appeals court based its decision on a regulation issued by the Department of Education a year ago, interpreting the requirements of a federal law known as Title IX, which prohibits schools that receive federal funds from engaging in sex discrimination.

"A school generally must treat transgender students consistent with their gender identity," the federal regulation said.

North Carolina Gov. Pat McCrory makes remarks during an interview at the Governor's mansion in Raleigh, N.C., on April 12. Gerry Broome / AP

The Justice Department cited that ruling in last week's letter to North Carolina.

Related: North Carolina Gov. McCrory Attempts to Walk Back Parts of Controversial Anti-LGBT Rights Law

McCrory and other state officials have been under pressure since the Justice Department warned last week that the law passed in March violates civil rights protections against sex discrimination on the job and in education for lesbian, gay, bisexual and transgender people.

In letters, federal civil rights enforcement attorneys focused on provisions requiring transgender people to use public restrooms that correspond to their biological sex.

But the law also bars local governments from prohibiting discrimination against LGBTQ people in public places. The state law was designed to block an anti-discrimination ordinance by the city council in Charlotte, which McCrory called “government overreach.”

A bathroom sign welcomes both genders at the Cacao Cinnamon coffee shop in Durham, North Carolina on May 3. JONATHAN DRAKE / Reuters

If the federal government yanked funding, the 17-campus UNC system could lose more than $1.4 billion in public money.

UNC President Margaret Spellings has said that the university system doesn’t endorse the law but is obligated to follow it.

Another $800 million in federally backed loans for students who attend the public universities also would be at risk if it's found that enforcing the law violates Title IX of the Civil Rights Act, which bars discrimination based on sex.

The divisive new law has already led to a nationwide fallout, and multi-billion-dollar companies continue to withdraw investment from the state as some residents decamp to "friendlier" locations. Founders and chief executives of more than a hundred companies — including Apple, Twitter and Alphabet — urged McCrory to repeal the legislation, while high-profile entertainers like Bruce Springsteen and Pearl Jam have canceled appearances in North Carolina.

The state also faces lawsuits by individuals and various civil rights organizations, including the ACLU, over the law.

“Transgender people work for the state of North Carolina, attend school in North Carolina, and are a part of every community across the state. It is unconscionable that the government is placing a target on their backs to advance this discriminatory political agenda,” the ACLU said in a statement Monday. “Lawsuits are normally filed to stop discrimination — not to continue it.”

Human Rights Campaign and Equality NC, two LGBT advocacy groups,criticized McCrory for spending taxpayers’ money on the lawsuit. “HB2 is a vile law attacking transgender North Carolinians and leaves many more unprotected from discrimination,” said HRC President Chad Griffin. “Rather than defending it, Governor McCrory should be working with state lawmakers to fix the mess he’s created.”