General Loretta E. Lynch (R) and Principal Deputy Assistant Attorney General Vanita GReuters

The U.S.JusticeDepartmenton Monday suedNorthCarolinato get it to abandon a law that restricts use of public restrooms, further escalating a fight over the rights oftransgenderAmericans.


Hours earlier,NorthCarolinaGovernor Pat McCrory and the state's secretary of public safety had sued the agency for declaring the law a civil rights violation, accusing it of "baseless and blatant overreach."


In March,NorthCarolinabecame the first state in the country to ban people from using multiple occupancy restrooms or changing rooms in public buildings and schools that do not match the sex on their birth certificate.


U.S. Attorney General Loretta Lynch said thedepartmentalso "retains the option" of curtailing federal funding toNorthCarolinaover the issue.


RELATED:North Carolina officials sue Justice Dept over bathroom law


"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," said Lynch, comparing the measure to Jim Crow-era racial discrimination laws and bans on same-sex marriage.

TheJusticeDepartment's complaint, which was filed in federal district court inNorthCarolina, named the state ofNorthCarolina, McCrory, the state'sDepartmentof Public Safety and the University ofNorthCarolinasystem as defendants.

Thedepartment's top civil rights lawyer, Vanita Gupta, sent letters to the same group last week, saying the ban was a civil rights violation and the state could face a federal lawsuit if it did not stop enforcing it by Monday.

TheNorthCarolinaofficials sued Gupta as well as U.S. Attorney General Loretta Lynch for their "radical reinterpretation" of federal civil rights law in federal district court inNorthCarolina.

"We’re taking the Obama admin to court. They're bypassing Congress, attempting to rewrite law & policies for the whole country, not just NC," McCrory, a Republican, wrote on Twitter.

McCrory told reporters thatNorthCarolinaleaders had been forced to pass the law, known as HB 2, after the Charlotte city council passed an ordinance requiring access to bathrooms based on gender identity in public as well as private buildings.

The Republican leaders ofNorthCarolina's state legislature also sued the U.S. government over the law on Monday, hours after McCrory's lawsuit.