JACKSON, Miss. – Mississippi Attorney General Jim Hood is suing Google for allegedly mining student data in violation of signed agreements with local school districts.

Hood filed the suit Friday in Lowndes County Chancery Court, alleging Google is violating the state’s consumer protection law by selling ads based on data from services provided to schools, The Associated Press reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

“They’re building a profile so they can advertise to them,” Hood said at a Tuesday news conference. “They expressly stated in writing that they would not do that.”

Google has not responded to a request for comment from the AP.

The lawsuit seeks to halt the company from “affecting commerce within the State of Mississippi by engaging in unfair methods of competition and unfair or deceptive trade practices,” according to the complaint, cited by the Hattiesburg American.

Hood contends Google offered its “.edu” email accounts to schools around the state free of charge, and is now leveraging its hold to track students’ activities online.

“Google went around to the school, the colleges and high schools, in Mississippi and said, ‘oh, here’s a free email system, Gmail, that you can use in your schools and we won’t min the children’s’ data.’ But what we found out from some other lawsuits that Google settled, some class action lawsuits around the nation, is that they were in fact mining that data of those children,” Hood said.

“That is a violation because they gave an express contract to the school administrators when they signed up for these services.”

MORE NEWS: How to prepare for face-to-face classes

Hood said his office conducted a test using student Gmail accounts through YouTube, then logged out and used the video site in a different browser.

[xyz-ihs snippet=”NEW-In-Article-Rev-Content-Widget”]

“It started shooting ads at us dealing with the same query that that child had put in,” he said. “So we know that they were tracking that child.”

The lawsuit seeks damages of $10,000 for each student Gmail account in Mississippi. The AP reports about half of the state’s schools use Google’s email, and the potential payout could run as much as $1 billion.

“When you give a written contract and you don’t follow it and you mine the data, then it’s a violation of the Mississippi Consumer Protection Act,” Hood said. “It’s an unfair and deceptive trade practice.”

The lawsuit isn’t Hood’s first legal tangle with Google. The company sued Hood in 2014 because it alleged his investigation into whether Google helped people find pirated music and illegal drugs was illegal. The U.S. Fifth Circuit Court of Appeals, however, ruled in April that the lawsuit is legal, and Hood said his office continues to investigate those allegations, the AP reports.

State lawmakers have also worked to curb the attorney general’s ability to sue big companies with House Bill 555, which was approve by a state House committee on Tuesday. The legislation would require civil lawsuits that could reap more than $250,000 to gain approval from a panel that includes the governor, lieutenant governor and secretary of state.

House Judiciary Committee Chairman Mark Baker told the AP the legislation is necessary because Hood has paid outside attorneys to pursue lawsuits on behalf of the state. The lawsuits also often address public policy, something Baker and other lawmakers feel is beyond his jurisdiction.

“Every lawsuit that he files is a declaration of public policy,” Baker said. “We’re the legislators, the setters of public policy. He’s the lawyer. He’s not also the client.”