Verizon-owned Oath has agreed to pay a $5 million penalty for violating a federal privacy law that prohibits online advertisers from tracking children without parental consent.

The ad business run by Oath's AOL property deliberately ignored the Children's Online Privacy Protection Act (COPPA), state prosecutors in New York said on Tuesday. "AOL flagrantly violated the law — and children's privacy — and will now pay the largest-ever penalty under COPPA," New York Attorney General Barbara Underwood said in a statement.

According to prosecutors, AOL's ad exchange knew it shouldn't be serving targeted ads on children-directed websites covered by the privacy law, but it did so anyways. As a result, AOL paved the way for online advertisers to use internet cookies to track children over the web and serve them targeted ads.

The ads were served to websites such as children's gaming platform Roblox.com and the teen girl-focused site Sweetyhigh.com, according to The New York Times, which was first to report the settlement.

"AOL conducted billions of auctions for ad space on hundreds of websites the company knew were directed to children under the age of 13," according to Underwood's office, which examined the company's ad practices from Oct. 2015 to Feb. 2017. Documents obtained from AOL also show that at least one company account manager broke the privacy law to help increase advertising revenues.

In response to the $5 million fine, an Oath spokesperson said: "We are pleased to see this matter resolved and remain wholly committed to protecting children's privacy online."

According to New York prosecutors, Oath has agreed to establish a "COPPA compliance" program to keep the company in line with the privacy law when selling advertising space to clients. "AOL has also agreed to destroy all personal information collected from children that is in its possession," the New York attorney general's office said.

Tuesday's settlement comes amid growing scrutiny over children's digital privacy. In April, consumer groups also accused YouTube of violating COPPA by collecting children's online data without parental consent. Other experts are calling out the ad practices used in mobile apps for kids as "manipulative."

"Our investigation into the illegal online tracking of children by marketers and advertisers will continue," New York's attorney general said on Twitter.

This article originally appeared on PCMag.com.