Google has stopped scanning millions of Gmail accounts linked to an educational scheme - a process it uses to target adverts.
The decision includes email accounts associated with Google Apps for Education (GAE).
This initiative provides teachers and students with access to free apps and storage, as well as customised @schoolname.edu email addresses.
The move follows reports the scans might have breached a US privacy law.
Google highlighted its use of such scans when it updated its terms and conditions last month.
"Our automated systems analyse your content (including emails) to provide you personally-relevant product features, such as customised search results, tailored advertising, and spam and malware detection. This analysis occurs as the content is sent, received, and when it is stored," the terms read.
However, the Education Week website said this data-mining activity might place the firm in breach of the US Family Educational Rights and Privacy Act.
The firm had already been sued over the matter in California by two students who said they had been required to use Gmail by their university, it added.
The UK's largest teachers' union greeted the change in policy.
"Commercialisation seeps into all corners of children's lives," said Christine Blower, general secretary, of the NUT.
"The targeting of children with advertising ranging from fast food to designer clothes is relentlessly pursued by commercial companies. This is a welcome move."
More than 30 million students, teachers and administrators use GAE, Google says.
The University of Westminster, the University of St Andrews and Southampton's Oakwood Junior School are among its UK customers.
Other clients include Nigeria's Ladoke Akintola University of Technology and the American University in Cairo.
Google had pledged not to show adverts within GAE's own apps, but the scans could have been used to tailor what appeared when users visited a website using the firm's AdSense platform - although the firm has indicated it never did this.
"We've permanently removed all ads scanning in Gmail for Apps for Education, which means Google cannot collect or use student data in Apps for Education services for advertising purposes," wrote Google for Education director Bram Bout on a company blog.
The change is also promised for users who signed up to Gmail as part of the service while at school or university, but have now moved on.
In addition, Mr Bout said, it would also be rolled out to current and legacy users of Google's Apps for Government and Apps for Business services.
However, other Gmail users will still have their accounts scanned.
"It is certainly telling that a company like Google, which is so reliant on data driven advertising, is taking steps to act on people's concerns about their privacy," said Emma Carr, deputy director of the campaign group Big Brother Watch.
"Scanning emails is clearly intrusive, so any step to protect children is a positive one. However, Google could certainly go further by introducing the same controls for users of all ages and for all of its services."