North Carolina Governor Pat McCrory conceded his re-election race to Attorney General Roy Cooper last Monday, but a complaint filed with the state’s Board of Elections alleges attacks against McCrory’s campaign may have been funded by government grant money that should have gone to public schools.

After a two-year investigation, the Civitas Center for Law and Freedom filed a suit against Cooper’s office Oct. 18, arguing that the Attorney General’s office had diverted millions from schools to begin an environmental grant program in violation of the state constitution.

In 2000, North Carolina Attorney General Mike Easley made an agreement with Smithfield Foods Inc. that required the pork production company to pay millions of dollars to fund “environmental enhancement grants” every year.

At least two other states have also entered into multi-million-dollar environmental enhancement agreements with Smithfield.

North Carolina’s constitution, however, mandates money from penalties or forfeitures go toward its schools. Civitas is arguing that Smithfield’s payments to the attorney general for these environmental grants required in the 2000 agreement are penalties and, therefore, violate the state constitution.

“Our primary focus is to protect the North Carolina constitution and make sure all public funds that should go to public education go to public education,” said Alexander Guin, Civitas Institute director of development.

According to the Greensboro News and Record, North Carolina is ranked 44th in the union for spending per pupil and 41st for teacher pay.

Before its agreement with the attorney general, Smithfield, which is now the nation’s largest hog producer, was looking to buy Murphy Family Farms Inc. in Rose Hill, North Carolina. Although attorney generals in Missouri and Iowa were suing to stop the merger and prevent Smithfield from becoming the largest hog production company in the country, Easley made an agreement with Smithfield. It required the company pay $15 million to North Carolina State University for environmental technologies and up to $50 million over 25 years to the attorney general’s office for environmental enhancement grants.

Prior to the agreement, Smithfield and its subsidiaries had violations under North Carolina law, according to a Civitas white paper, though it is unclear what those violations are.

According to Rolling Stone, the company has spilled millions of gallons of fecal waste into North Carolina’s rivers. In Virginia, Smithfield paid $12.6 million to the Environmental Protection Agency for violations of the Clean Water Act.

Smithfield “voluntarily” agreed to fund water research and quality projects in North Carolina, a representative for Cooper said after Civitas filed its suit, according to the white paper.

Guin, however, said that defense is doubtful.

“I think it stands to reason that any time a corporation enters into an agreement like this with the state, they’re not doing it out of the goodness of their hearts,” Guin said. “It looks pretty clear it was signed under threat.”

The text of the document signed by Smithfield and Easley, though, appears to disagree: “This Agreement shall not be construed as a settlement of any liability of the Companies for penalties, fines, damages or other liability.”

But on the page of the attorney general’s website that discusses the grant program, it says a “settlement” with Smithfield funds the initiative, using the same word the agreement claims it isn’t.

Additionally, a 2005 North Carolina Supreme Court decision shot down a state Department of Environment and Natural Resources rule that allowed those who violated environmental law to send a portion of their penalties to “supplemental environment projects.” The court determined directing the money away from schools was unconstitutional.

The grants Smithfield began funding through the attorney general’s office under Easley and now Cooper beginning in 2001 are supplemental environment projects, Civitas states, making them unconstitutional.

But one of the recipients of those grants may have also helped fund attacks against McCrory, Cooper’s Republican opponent, in the gubernatorial race, according to a complaint Civitas filed with North Carolina’s Board of Elections.

Since 2004, the Pamlico Tar River Foundation — now called Sound Rivers — has received nearly $400,000 in grants from the attorney general’s office. It is a member of the North Carolina Environmental Partnership, which spent $1.6 million on TV ads opposing McCrory in this election, according to the white paper.

The North Carolina Environmental Partnership hasn’t publicly disclosed the source of its funds for the advertisements, and there is no evidence of verification as to how Pamlico Tar River Foundation used the grant money.

“It appears a recipient of this environmental grant program is running ads against the incumbent governor, which is unethical, and it’s wrong,” Guin said.

Additionally, Shuanghui International Holdings purchased Smithfield in 2013. That means the money going toward the grants could be of Chinese origin. If that is true and the grant money is being used for the North Carolina Environmental Partnership’s attack campaign, as Civitas suggests, the grants would violate laws making it illegal for foreign money to influence U.S. elections.

Cooper’s office, Smithfield, and Sound Rivers didn’t respond to request for comment.

Civitas’ lawsuit seeks to end future grants made under the 2000 agreement and for the attorney general’s office to recover the funds it granted to interest groups that should go to schools, if the agreement does constitute as a settlement.

But if the grant money did instead go toward attacks on McCrory, the damage has already been done. Cooper won the election by more than 10,000 votes, about 0.2 percent of the ballots cast.