At the forefront of bringing technology to America's classrooms, Google uses its dominance in schools to "spy" on millions of future customers, tracking the digital lives of kids as early as kindergarten, a lawsuit filed by New Mexico's attorney general alleges.

"The consequences of Google's tracking cannot be overstated: Children are being monitored by one of the largest data-mining companies in the world, at school, at home, on mobile devices, without their knowledge and without the permission of their parents," according to the suit, filed Thursday by Hector Balderas, the state's attorney general.

In just a few years, Google "infiltrated more than half the nation's primary and secondary schools by offering a 'free' web-based service" that gives kids access to applications including the company's email, calendar and drive services, according to the state's suit.

Get Breaking News Delivered to Your Inbox

Further, the suit alleges Google misled schools and parents with assurances there were no privacy issues with its educational product even as it stockpiled potentially sensitive material on kids' whereabouts and online behavior.

Marketed as a purely educational tool, Google Education is now used by more than 80 million educators and students, giving the company access to their digital lives and personal data, the lawsuit stated. More than 25 million students and teachers also use Chromebooks, laptops that run on Google's operating system, it added.

"More valuable still, Google has captured generations of future customers who are trained to use Google's platform as early as kindergarten," it noted.

The company's data-mining of kids violates the Children's Online Privacy Protection Act, which requires companies to get a parent's consent before collecting the name, contact information and other personal details from a child under 13, according to the suit.

"Google has used Google Education to spy on New Mexico children and their families by collecting troves of their personal information," the suit stated.

Google, however, dismissed the allegations: "These claims are factually wrong," a spokesperson said in an email to told CBS MoneyWatch.

"G Suite for Education allows schools to control account access and requires that schools obtain parental consent when necessary," the spokesperson said. "We do not use personal information from users in primary and secondary schools to target ads. School districts can decide how best to use Google for Education in their classrooms and we are committed to partnering with them."

Google in September agreed to pay $170 million to settle federal and state claims it had violated children's privacy on YouTube by collecting personal information on kids without their parents' consent.

The complaint filed by the Federal Trade Commission and New York attorney general alleged Google-owned YouTube used "cookies," or personal identifiers, to track kids, allegedly raking in millions by then using the information to show them targeted ads.