Chaos erupted at the Timothee Chalamet lookalike contest in Manhattan on Sunday as cops busted up the event — and the Hollywood heartthrob made a surprise appearance in the middle of the mayhem.
The shaggy-haired “Dune” and “Wonka” star, 28, stunned the throngs in Washingon Square Park when he popped up in the middle of one contestant posing for the cameras, then began signing autographs for the thrilled crowd.
Chalamet’s appearance came as a couple of NYPD cops and city Parks Department enforcement agents tried to break up the crowd of several hundred people, saying it was an unlawful gathering without a permit.
A shaggy-haired Chalamet doppelganger was handcuffed by cops during the mayhem, prompting the crowd to chant, “Let him go!”
“One Willy Wonka lookalike who was taken into custody,” an NYPD rep said.
Dozens in the group then moved on to the nearby Mercer Playground after the crowd was dispersed — where more than a half-dozen remaining Chalamet-wannabes launched into speed-dating rounds with female admirers.
“I don’t know what I expected, to be honest. Not this — but it’s fun,” said a woman named Gwen, who attended the event with two friends. “I was like, ‘Either a million people are going to show up or no one’s going to show up.’ “
Her friend, Andy, called the Chalamet-fest “camp.
“I first saw the picture of Timothee with the [event] poster,” Andy said. “And I was like, ‘If he shows up, I have to go.’ “
The unusual contest was announced earlier this month and carried a $50 prize for the Hollywood heartthrob’s lookalike.
The organizers also said the winner received a $250 trophy.
Partiful, an online RSVP company, sponsored the event.
The top prize went to Miles Mitchell, a 21-year-old Staten Island resident and a student at Seton Hall University.
“I would buy more chocolate to give to everyone,” he told the crowd.
Mitchell later told The Post, “I thought it would be a fun, interactive thing.
“I dress up, it’s in Washington Square Park, so there’s always, like, crazy stuff that goes on there.”
Asked about the chaos at the event, he added that “it was really hectic, but I guess it wasn’t surprising since so many people were there.”
The Staten Islander was one of two finalists, with the other a Georgia resident who said he would have taken his girlfriend on a date if he won.
Aten Moot, a 24-year-old runner-up who recently moved to the Big Apple, said it was all worth it in the end.
“What’s a better way to get acquainted with New York?” Moot quipped.
Chalamet also is known for the movie “Call Me by Your Name” — and as Kylie Jenner’s rumored beau.
A rep for the actor did not respond to a Post request for comment.