Google's YouTube will pay $170 million to settle allegations by the Federal Trade Commission and the New York attorney general that it earned millions by illegally collecting personal information from children without their parents' consent.

The settlement, announced Wednesday, was passed in a 3-2 vote by the commissioners along party lines. The two Democrats voted against it, saying it did not go far enough to punish YouTube.

Shares of Google parent company Alphabet were up 1.1% at the end of trading Wednesday.

The settlement requires Google and YouTube to pay $136 million to the FTC and $34 million to New York for allegedly violating the Children's Online Privacy Protection Act. The $136 million penalty is the largest amount the FTC has ever obtained in a COPPA case since Congress enacted the law in 1998, according to the agency.

"YouTube touted its popularity with children to prospective corporate clients," wrote FTC Chairman Joe Simons, who voted in favor of the settlement. "Yet when it came to complying with COPPA, the company refused to acknowledge that portions of its platform were clearly directed to kids. There's no excuse for YouTube's violations of the law."

The COPPA rule requires child-directed sites to disclose data practices and get parental consent for collecting information on children under age 13. The complaint alleged that YouTube collected personal information from "viewers of child-directed channels" without parental consent using cookies, which track user behavior across the internet.

"Google and YouTube knowingly and illegally monitored, tracked, and served targeted ads to young children just to keep advertising dollars rolling in," New York Attorney General Letitia James said in a statement following the announcement. "These companies put children at risk and abused their power, which is why we are imposing major reforms to their practices and making them pay one of the largest settlements for a privacy matter in U.S. history."

YouTube marketed itself to Mattel and Hasbro as the "leader" in reaching children ages 6-11, the ruling found. Yet, in one instance, the company told an advertising company that it did not have users younger than 13 on its platform and therefore channels on its platform did not need to comply with COPPA.

In a blog post Wednesday, YouTube said it is taking steps to address the concerns raised over its practices.

"From its earliest days, YouTube has been a site for people over 13, but with a boom in family content and the rise of shared devices, the likelihood of children watching without supervision has increased," it said. In four months, YouTube added, it will restrict data collection on videos directed at children to "treat data from anyone watching children's content on YouTube as coming from a child, regardless of the age of the user."

YouTube said it will completely stop serving personalized ads on child-focused content and will disable comments and notifications on those videos as well. Creators will be responsible for identifying whether their content is made for kids, but YouTube said it will also use machine learning "to find videos that clearly target young audiences."

In its post, YouTube recommended parents use its separate app, YouTube Kids, to let children under 13 watch on their own. YouTube said it will be promoting the app more heavily across its services and is creating a $100 million fund to be disbursed over three years to create new children's content on both YouTube and YouTube Kids.

In addition to the penalty, the settlement requires Google and YouTube to "develop, implement, and maintain a system that permits channel owners to identify their child-directed content on the YouTube platform" so that YouTube can ensure it is complying with COPPA. It also requires them to provide notice about their data collection practices and "obtain verifiable parental consent" before collecting personal information from children.

At a press conference Wednesday following the announced, Simons, the FTC chairman, said, "no other company in America is subject to these types of requirements and they will impose significant costs on YouTube." Once YouTube implements the terms of the settlement, he said, the FTC will conduct a "sweep" of the platform to verify whether child-directed content is being properly labelled.

Asked about how the FTC would conduct a sweep of YouTube's massive content library, Andrew Smith, director of the bureau of consumer protection said, "I think that we have a variety of tools at our disposal to cull through those 23 million channels in an expeditious way," as the agency has done in other COPPA cases.

"I have no doubt that it will be similarly successful with respect to YouTube despite the large quantity of information on the platform," he said.

"For the third time since 2011, the Federal Trade Commission is sanctioning Google for privacy violations," FTC Commissioner Rohit Chopra said in a dissenting statement. "This latest violation is extremely serious. The company baited children using nursery rhymes, cartoons and other kid-directed content on curated YouTube channels to feed its massively profitable behavioral advertising business."

Chopra said that with the Google settlement "the Commission repeats many of the same mistakes from the flawed Facebook settlement: no individual accountability, insufficient remedies to address the company's financial incentives and a fine that still allows the company to profit from its lawbreaking. The terms of the settlement were not even significant enough to make Google issue a warning to its investors."

Chopra and fellow Democratic commissioner Rebecca Kelly Slaughter had both voted against the FTC's earlier $5 billion settlement with Facebook, ending a probe into its data practices. Like the Facebook settlement, both argued the Google deal did not go far enough to curb what they describe as harmful practices.

"When it comes to fencing-in relief, the current order looks like a fence but one with only three sides," Slaughter wrote in a dissenting statement. "The missing fourth side is a mechanism to ensure that content creators are telling the truth when they designate their content as not child-directed. And such a mechanism is surely within YouTube's mighty technological capacity."

While Smith, the bureau of consumer protection director, said he "appreciate[s] the concerns" the two dissenting Democratic commissioners raised in their statements, he is "saddened" by the partisan divide over the settlement.

"I hope that business does not doubt our resolve that this is an historic penalty. It is staggeringly large in the privacy world and in the COPPA world," Smith said at the press conference.

Besides the terms of the agreement, Smith said the case is significant because "we are holding a platform liable under COPPA for content posted by somebody else. That's a really big deal. And if you think about all the platforms out there in the world and the economic power that they wield and the amount of content that they host, this is game changing."

The settlement is the latest move from regulators to crack down on privacy violations from large tech companies, including its recent settlement with Facebook. The Justice Department and Attorney General William Barr also have announced antitrust probes that reportedly includes Google.

It also comes as the company grapples with criticism for disinformation and violent content. Last week, CEO Susan Wojcicki doubled down on keeping YouTube "open" on the belief that it does more good than bad for society.

Ahead of the fine, YouTube made some tweaks to its platform, including changing algorithms and ending targeted ads.