Google will no longer scan the contents of emails received by Gmail users in order to gather information for targeted advertising, Bloomberg reported.

The decision to end the controversial practice comes not from Google’s advertising team, but rather from its cloud unit. According to Bloomberg, the decision comes as part of an effort to pitch Google’s suite of office software to corporate customers.

Read: Google Agrees To Change Email Scanning Process To Avoid Privacy Lawsuit

Google is currently positioning office software—a collection of services known as G Suite that includes Gmail, Docs, Drive and Calendar—to compete with the industry leader in the space, Microsoft Office. Current distinctions between the paid and free service have caused confusion for customers.

Under the previous system, paying Gmail users never had their emails scanned for advertising purposes, while free users were subjected to targeted advertising that was often based on the content of messages arriving in their inbox.

With the change, no Gmail users—free or paid—will have their emails scanned to gather information for advertising. Google will continue to insert promoted messages and advertisements in the free version of Gmail, but those ads will come from other information Google has already gathered about the user from their search history and YouTube activity.

Users will have the ability to control what information is used to target them or turn off advertising personalization entirely by going to their account page and choosing the ad settings option under the “Personal Info & Security” heading.

Read: Email Privacy: Judge Rejects Settlement For Google's Email Scanning Practices

While part of the decision by Google to discontinue its email scanning practices may have been driven by confusion and privacy concerns among its users, a large part of the move can likely be chalked up to the mounting lawsuits the company faced over the scans.

Google was sued in 2015 over the practice, which it was argued violated the federal Electronic Communications Privacy Act and the California Information Privacy Act. At issue in the case was Google's practice of scanning emails received by Gmail users that were sent by users of other email services. Those users did not opt into Google’s privacy agreement that allows them to perform those scans.

Google voluntarily agreed to settle the case late last year by changing its scanning practice. The proposed settlement would have allowed the search giant to continue to check emails in advance for virus protection and spam filtering purposes but would have postponed the advertising-related scan until after the email is accessible in a user’s inbox rather than before it arrives.

That technical change, along with a $2.2 million settlement, was rejected by Judge Lucy Koh, a federal judge on the district court in San Francisco. Koh argued the change did not go far enough to explain to consumers how Google is scanning the emails and what it is doing with the information.

Google’s decision to end the practice altogether likely solves the privacy and legality concerns raised by Koh, while also allowing Google to avoid having to reveal to users just how much information it gleaned from scanning their emails.

Newsweek’s Structure Security conference on Sept. 26-27 in San Francisco will highlight the best practices that security professionals are using to protect some of the world's largest companies and institutions, join us for two days of talks, workshops and networking sessions with key industry players - register now.