About 12:30 p.m. Friday, the New York Police Department’s entertainment unit saw that Kai Cenat, a social-media streamer who has more than 6 million followers, had said that he would be in Manhattan’s Union Square that day, ready to give away free PlayStation 5 consoles and other prizes to fans who showed up.

The local precinct sent a few officers and supervisors. By 1:30 p.m., there were about 300 fans in Union Square.

“Not a big crowd,” Jeffrey Maddrey, the chief of the department, said at a news conference on Friday. “Something we’d expect for a social media event like this.”

The crowd grew. Fast.

Soon, there were about 6,000 people massed in Union Square. Chaos ensued: Fans of Mr. Cenat darted in and out of traffic, climbing on the hoods of cabs and other cars. Others clambered up lampposts and traffic signs, toppled trash cans or threw objects at police officers. Several set off firecrackers, sending throngs of people running. The swarm spilled out onto Broadway, Park Avenue and other neighboring streets to the north, south, west and east.

By the end of the afternoon, at least 66 people — about half of them minors — had been arrested. Mr. Cenat, who had tried to flee the giant crowd in a black SUV, was charged with inciting a riot, among other offenses. By 6 p.m., the crowd had dispersed but questions remain over how it grew so large and dangerous.

The charges against the crowd included disorderly conduct; unlawful assembly; resisting arrest; inciting to riot; riot; obstruction of governmental administration; failure to disperse; and criminal possession of a weapon.

On Monday evening, a statement from Mr. Cenat’s Any Means Possible group said no one had anticipated the scale of the event and that they were “deeply disappointed by the outbreak of disorderly conduct.” But how might the mayhem been avoided?

Mr. Cenat, 21, has developed a huge following thanks to his high-energy videos on YouTube and Twitch, a livestreaming service where he is among the most watched.

He has posted shakily filmed clips of himself shopping in Tokyo, buying his mother a house and fleeing enormous snakes. He also livestreams himself playing video games with rappers, and has shared a video where he goes to dorms and asks college students if he can spend the night in their rooms.

Mr. Cenat, who is from the Bronx, told his Twitch followers on Wednesday that he would be in Union Square on Friday. He asked how many fans would show up.

A flurry of answers came in: 1,000, 5,000, 10,000. A friend sitting next to him said so many would come that Mr. Cenat would need security and barricades.

“All trains go here so there’s no excuse,” Mr. Cenat told those watching. “I love you all so much, bro.”

Word spread, and his followers flocked to Union Square.

Most event organizers obtain city permits so that law enforcement can close streets and create access points. Mr. Cenat did not notify authorities or get a permit, Chief Maddrey said.

When a crowd surges, the police can activate what they call a rapid mobilization, designating an emergency that requires swift backup, according to the Police Department patrol guide.

On Friday, officials called in a level-four mobilization — the most urgent. Soon after, hundreds of officers including members of specialty units like the counterterrorism bureau and the strategic response group swooped in.

Officers in tactical gear formed lines to herd people out, as a loudspeaker told the crowd to get out of the area. “If you leave voluntarily, no charges will be placed against you,” they said in a message played over a loudspeaker. “If you refuse to leave, you will be arrested for unlawful assembly.”

That kind of response is necessary, said Brian Higgins, a security and public safety consultant and former chief of the Bergen County, N.J., police department.

A crowd as large and rowdy as Friday’s is “extremely dangerous,” said Mr. Higgins, an adjunct professor at John Jay College of Criminal Justice, threatening a deadly crush, he said.

“When it gets to that point,” Mr. Higgins said, “it really has to be brought down with force.”

A video with more than 2.2 million views on Twitter shows a disturbing encounter from Friday: A young man in a red sweatshirt stands looking confused as a crowd flees approaching officers. Two officers grab the man and hurl him at the rear of the taxi. His head hits the broken window, and he is placed under arrest.

The police said the incident is under review.

The Civilian Complaint Review Board, an independent agency that investigates police misconduct, said it was looking into four incidents, including the arrest of the man in the sweatshirt, according to a spokeswoman.

Edwin Raymond, who retired as a lieutenant this past spring, said officials should review their response. Rather than arrest Mr. Cenat immediately, for example, the police could have used him to address the crowd, he said.

“The minute that the N.Y.P.D. moved Kai Cenat from the scene, they lost their chance to leverage him,” Mr. Raymond said.

Chief Maddrey said officers showed restraint dealing with people, many of them minors, who destroyed police vehicles, including his own. Officers escalated force in proportion with the crowd’s behavior, said Chief Maddrey, who described getting hit in the head with an object.

“We had to be very, very delicate in how we handled this,” he said. “We wanted the kids to just comply with us and leave. But we were met with a lot of resistance. We were attacked.”

Mayor Eric Adams said young people are “being inundated by influencers.”

“Our children cannot be raised by social media” he said on Saturday at a news conference in Brooklyn. “Our children cannot get their values, their beliefs from social media and other outside entities.”

He also said the event drew people “from outside of the city” and that officials are “looking into where there’s some even outside agitators.”

“You don’t come to get free Game Boys and bring smoke bombs and bring M80s and bring other disruptive items,” Mayor Adams said.

Chief Maddrey said Monday on Fox 5 New York that many parents came to Union Square to see whether their children had been hurt in the melee or arrested.

“We don’t want to touch your children,” he said “We don’t want them to go to jail. We want you to be mom and dad, grandma, uncle. Grab the young person and say, stop it now.”

Mr. Higgins said the blame lies squarely on a social media personality who failed to take the proper steps to ensure a safe event and unruly fans who failed to listen to the police.

“Disperse when you’re told to disperse,” he said.

The police should not underestimate the lure of free goods, Mr. Higgins said. Shirts and hats are not a big deal, Mr. Higgins said. Free game consoles?

“That’s something that should have been picked up on,” he said.

As of Monday afternoon, it was unclear whether any fans received the prizes Mr. Cenat had offered.