North Carolina Gov. Pat McCrory has dropped a lawsuit against the federal government over a state law that bans transgender people from bathrooms matching their gender identity in government facilities.

But it's far from the end of legal sparring over the issue: McCrory will continue to defend the law in two other cases, including one in which the government sued McCrory and the state.

Lawyers for McCrory filed a court brief on Friday that said withdrawing the governor's lawsuit was a matter of efficiency.

"[T]he substantial costs to the State of litigating similar legal issues in two different judicial districts, and the interests of judicial economy and efficiency, plaintiffs feel compelled to file this notice of voluntary dismissal without prejudice," the governor's brief said.

McCrory had sued the federal government in May, arguing the Justice Department overreached by interpreting the Civil Rights Act of 1964's ban on sex discrimination in the workplace to also ban transgender discrimination. The complaint argued “this is an attempt to unilaterally rewrite long-established federal civil rights laws in a manner that is wholly inconsistent with the intent of Congress."

The Department of Justice had previously threatened enforcement action against the state for its bathroom law, which also blocked cities from passing LGBT nondiscrimination ordinances.

After McCrory filed his lawsuit, the Justice Department retaliated in its own lawsuit against the governor and the state. That lawsuit, which continues, said the North Carolina law "singles out transgender individuals, results in their isolation and exclusion, and perpetuates a sense that they are not worthy of equal treatment and respect."

McCrory and North Carolina are also defendants in another lawsuit over the law, that one brought by transgender students and workers.

McCrory said in his brief Friday that the state will continue to defend the law in those ongoing lawsuits "to protect the State’s interests."