The files of a deceased Republican operative who masterminded GOP gerrymandering efforts show that Republicans in North Carolina misled a federal court in 2017 to extend the life of their state legislative district map, a watchdog group claims in state court documents released Thursday.

The group, Common Cause, claims that North Carolina officials had told a federal court they would not be able to redraw the state's legislative district map, which had been ruled unconstitutional, in time for a special election and needed more time to comply.

But the files of the operative, Thomas Hofeller, reveal that nearly all of the work of drawing up new districts, including tallying the racial composition of each, had been nearly completed, with proposed new boundaries for more than 97 percent of the state’s Senate districts and 90 percent of House districts, the group’s lawyers alleged in the state court documents.

After the federal court issued an order halting the special election, the existing map was kept in place, which allowed Republicans to maintain a veto-proof majority in the state legislature for another year.

Hofeller has also been linked to the Trump administration's controversial push to add a citizenship question to the 2020 census, which he had argued would give an advantage to Republicans by suppressing responses in immigrant communities, according to court records.

Hofeller wrote letters and memos that said the census citizenship question would create an electoral advantage for "Republicans and Non-Hispanic Whites," and the Justice Department adopted his rationale and some of the actual wording in a letter on its reasons for adding the question, the American Civil Liberties Union said court documents last week.

The Trump administration has maintained that adding the question was intended to improve enforcement of the Voting Rights Act. The Supreme Court is now considering whether the Commerce Department, which oversees the census, acted properly in ordering the question to be added.

The existence of Hofeller's files was disclosed after his daughter, Stephanie Hofeller, said she was seeking an attorney for her mother and contacted the head of Common Cause in North Carolina for a recommendation, according to a court deposition last month. In October of last year, a couple of months after her father died, she found four external hard drives and 18 thumb drives that contained more than 75,000 files, as first reported by The New York Times. She mentioned the drives in passing to a Common Cause staffer during a meeting, and later turned them over to the group after it issued a subpoena for the records in its case against the state’s redistricting efforts, she said in the deposition.

Common Cause is now trying to quash efforts by North Carolina officials to have the records returned and the documents destroyed or marked confidential.

Lawyers for North Carolina officials argue that many of the files are protected expert witness material “created by Dr. Hofeller in connection with North Carolina legal matters.” They also accuse Common Cause’s lawyers of neglecting their professional responsibilities and violating the state's rules of civil procedure.

“Our clients are considering all options available to them to enforce their rights,” Phillip J. Strach, an attorney for the North Carolina officials, said a letter disclosed in court documents.