Google will pay $170 million to settle allegations that it illegally collected data about children younger than age 13 who watched toy videos and television shows on YouTube, settling a long-running government investigation but leaving some in Washington once again furious that regulators had been outmatched by Silicon Valley.

In a sweeping complaint, state and federal regulators alleged Google knew that some channels on YouTube were popular among young viewers and tracked kids’ viewing habits for the purpose of serving them targeted ads, ultimately raking in “close to $50 million” from just a short list of channels that violated federal children’s privacy laws.

The settlement — brokered by the Federal Trade Commission and the attorney general of New York — brushed aside years of claims by YouTube that it was not intended for children under 13 by citing numerous examples in which the company bragged to toy makers such as Mattel and Hasbro about its popularity among children. In one boast cited by regulators, YouTube claimed to be watched by 93 percent of “tweens,” roughly in line with independent surveys of the viewing habits of preteens.

State and federal regulators said the settlement would force YouTube and other social media companies to be mindful when children under age 13 are using their services. But a wide array of privacy advocates, lawmakers and even some of the FTC’s own members said the penalties against Google would serve as no deterrent given its massive revenue.

While the fine set a record for a violation of the Children’s Online Privacy Protection Act (COPPA), the federal law that forbids the tracking of users under 13 without parental permission, it amounted to less than two days’ worth of profits for the tech giant, advocates noted.

The settlement also held no Google executives directly accountable, didn’t require the company to admit guilt and left some experts fearful that it might contain a loophole allowing YouTube to avoid liability for kids’ privacy missteps in the future.

“It’s good that the FTC is finally attempting to hold Google accountable for violating COPPA at a massive scale for a number of years. But the settlement shifts far too much of the responsibility onto the content creators and not enough to YouTube, and the fine is woefully inadequate,” said Josh Golin, executive director of the Campaign for a Commercial-Free Childhood, an advocacy group based in Boston that was among those who filed the complaint last year.

The tension over the settlement underscored the limits of COPPA, which is at once one of the nation’s few federal privacy laws but also, critics say, outdated and unevenly enforced. The FTC has initiated a process to update the rules enforcing the law, and a major rewrite has been proposed by Sen. Edward J. Markey (D-Mass.), one of the law’s original authors, and Sen. Josh Hawley (R-Mo.), but even their bipartisan proposal has not yet advanced on Capitol Hill.

“I do not believe that the moment is slipping away on the protection of children,” Markey said in an interview.

The settlement accepts many of the claims raised by more than 20 consumer and privacy groups in an April 2018 complaint and echoes years of concerns that YouTube had become the most popular site for children while sidestepping COPPA. Privacy advocates long had pointed out that many popular channels on the site are directed to younger audiences, featuring nursery rhymes as well as videos of children unwrapping toys. The Post first reported on the FTC investigation in June.

The FTC and regulators in New York agreed, finding that Google’s own content-rating systems had identified certain YouTube channels as directed toward children.

COPPA has two key tests in assessing whether a site must comply: whether it is directed toward children and whether the site has “actual knowledge” that children use it. The FTC settlement asserted Wednesday that YouTube failed both tests after years of claiming that its site was not intended for children and hence not covered by COPPA.

“YouTube touted its popularity with children to prospective corporate clients,” FTC Chairman Joe Simons said in a statement. “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 settlement was notable for the extent to which regulators used YouTube’s own statements and actions against it. They cited that YouTube’s own rating system often labeled videos as intended for viewers under 13 but still allowed tracking and targeted advertising. Regulators cited the channels featuring My Little Pony, Barbie, Thomas & Friends and Hot Wheels as evidence that they were intended for a young audience.

YouTube created a separate app for children in 2015, called YouTube Kids, in part to address complaints that the main platform had too many young viewers. But regulators noted that many videos appeared on both services. The only difference was that viewers were not tracked and targeted on YouTube Kids but were when the same children’s videos appeared on YouTube itself.

One popular channel that has content appearing on both services, called Sandaroo Kids, says on its YouTube page, “We love dressing in Disney Princess Costumes, playing pranks and teaching kids how to learn colors,” according to the complaint from regulators. The channel includes videos with such titles as “Barbie & Ken Dolls Fashion Show Party with Doll Ambulance.” The channel Little Baby Bum, meanwhile, had videos such as “Bath Song” and “New Baby Brother & Sister.”

Along with its fine, YouTube agreed to develop a system that would require content creators to indicate whether their videos are directed toward kids, turning off tracking for targeted ads in cases where it believes a child is watching. YouTube also announced additional changes on its own, including work to train its software to detect content that is kid-oriented using a type of artificial intelligence known as machine learning.

“This action is changing YouTube’s business model,” said Andrew Smith, the director of the FTC’s Bureau of Consumer Protection. “YouTube cannot bury its head in the sand.”

But the settlement stopped well short of what advocates were seeking. Backed by the agency’s three Republicans, the settlement sparked criticism from the FTC’s two Democrats, who voted against the agreement even as they criticized YouTube for profiting improperly from its younger users.

In a dissenting statement, Commissioner Rebecca Kelly Slaughter expressed fears that the government’s settlement requires too little from YouTube to find and discipline content creators that intentionally mislabel their videos, resulting in a “fence but one with only three sides."

Democratic Commissioner Rohit Chopra, meanwhile, faulted the FTC for failing to obtain a larger fine for Google “illegally harvesting children’s data,” which he wrote was “extremely lucrative” for Google. His dissent includes redacted data suggesting that behavioral ads improperly displayed on videos viewed by kids should have resulted in a fine in the billions of dollars.

Democrats on Capitol Hill also blasted the FTC. “When companies like Google repeatedly break the law, the FTC must demand structural change and executive accountability,” Sen. Richard Blumenthal (Conn.) said in a statement. “I am concerned that the divided vote reflects a lack of resolve and a lost opportunity to impose necessary accountability measures to rein in Google’s pattern of privacy abuses.”

In a rare move, the FTC filed the settlement in federal court on its own. Typically, such consent orders are filed on the agency’s behalf by the Justice Department, suggesting the government may have been split over some element of the YouTube investigation. “Following a careful review by its Consumer Protection Branch, the Department of Justice declined the FTC’s proposed settlement,” a Justice Department official said Wednesday, who spoke on the condition of anonymity because the person was not authorized to discuss it publicly.

The FTC settlement with Google marks the latest effort to probe and penalize tech giants for their privacy abuses, punishments that have served as a litmus test — even within the agency itself — about its power to police Silicon Valley.

In July, the commission issued a historic, $5 billion fine against Facebook for allegedly deceiving users about the way it collects and shares their personal information. But the penalty is far less than what some Democrats at the FTC, lawmakers on Capitol Hill and privacy hawks had hoped for, arguing the fine was too small — and the remedies too weak — to force significant changes in Facebook’s business practices.

Earlier this year, the FTC issued a $5.7 million fine against the app now known as TikTok over charges that it illegally collected data from children. Democrats chafed at the FTC’s decision at the time not to hold specific executives responsible for the company’s abuses.

Dig Deeper: Personal tech + Privacy

Want to learn about how to keep your personal information private? Check out our curated list of stories below.

Americans receive more than 5.2 billion automated calls in a month. But there are new apps to help stem the deluge.

As tech columnist Geoffrey Fowler slept, a dozen marketing companies used his iPhone to learn his number, email, location and IP address.

Changing privacy default settings means you’ll get less personalization from some services, but it can slow down the number of eerie on-the-nose ads driven by data siphoned by major companies.