— A lawsuit challenging a sweeping elections law that the General Assembly passed last year could force open legislative emails to public inspection for the first time.

North Carolina's public records law gives people the right to see emails and letters by government officials, but state lawmakers have claimed for years that they're exempt from that law.

Groups that oppose the law, including the state chapter of the NAACP, the League of Women Voters of North Carolina and the American Civil Liberties Union, contend that lawmakers are trying to make voting more difficult, especially for minority voters.

"There are a number of measures – a week of cuts to early voting, the elimination of same-day registration – that the public is not in favor of, was not calling for," said Chris Brook, state legal director for the ACLU. "Why then did the legislature decide to go down this route and adopt these very draconian changes?"

The plaintiffs tried to subpoena lawmakers' emails to determine their motives, but the lawmakers refused, arguing that legislative privilege makes their emails confidential.

U.S. Magistrate Judge Joi Elizabeth Peake ruled Thursday that legislative immunity must be evaluated "under a flexible approach" that balances the public's right to know and the legislative process.

"The Court concludes that, while the judicially-created doctrine of 'legislative immunity' provides individual legislators with absolute immunity from liability for their legislative acts, that immunity does not preclude all discovery in the context of this case," Peake wrote.

The judge also ruled that additional categories of documents may be released after further hearings in the coming weeks.

Mike Tadych, who represents WRAL and other media organizations, said he's not aware of a previous ruling on the issue in North Carolina.

"Legislators' email communications with third parties are public records under the law," Tadych said. "Prior to that, there had been some suggestion by both the executive branch and the legislative branch in North Carolina that there was an absolute privilege, that the public records law didn't apply."

A spokeswoman for the state Attorney General's Office, which is defending the lawmakers against the subpoena, said state lawyers are reviewing the ruling and haven't decided on a possible appeal.

Lawmakers in most states have some immunity – North Carolina offers more than most – but if Peake's ruling stands, voters could soon know a lot more about how outside groups influence laws.

"North Carolinians should be able to see the deliberations that their legislators go through when they're considering bills. They should be able to see what legislators were relying upon," Brook said.