More than 2 million revelers crammed into Times Square to usher in the New Year as news broke late Saturday night that a terrorist dressed as Santa Claus had opened fire in an Istanbul nightclub, killing at least 35 people and wounding dozens more.

But NYPD officials said New York City — especially Times Square, home of the famed ball drop — remained safe. While they said no specific threats were directed at Times Square, known as the “Crossroads of the World,” the NYPD sent some units to nightclubs and large New Year’s gatherings on the west side near Greenwich Village.

“We don’t have much information on the perpetrators at this point or their motives or a claim of responsibility,” said NYPD counterterrorism bureau chief James Waters shortly before 9 p.m. Saturday. “We have no reason to believe that what happened over there is going to be related to anything locally but we prepare here in New York City.”

Gov. Andrew M. Cuomo offered his prayers and support to Istanbul.

“As we continue to learn the facts, I have directed all New York law enforcement to remain vigilant as New Year’s Eve celebrations take place throughout the state,” Cuomo said in a statement Saturday night. “Additionally, the New York State Police, the New York State Emergency Operations Center, the New York State Intelligence Center and the Division of Homeland Security and Emergency Services are actively monitoring the developments of this situation for any potential threats and remain in constant communication with their local and federal partners.”

Diane McGrane, 58, of Garden City, said though she was initially concerned about security in New York City for the holiday, she, her brother and teenage nephews made the trip anyway. She celebrated in Times Square about 20 years ago too.

“You can’t stay home,” she said. “You can’t show them you’re afraid. You have to go outside.”

City officials had already devised plans to thwart a Nice- or Berlin-style attack, where trucks were driven into crowds and killed scores of people, by stationing as many as 150 trucks around Times Square. 

The vehicles, including 65 sand-filled sanitation trucks, are “crucial to our strategic approach this year,” Mayor Bill de Blasio said last week. Plainclothes officers trained to detect suspicious behavior mixed into the crowd, while other officers armed with heavy weaponry, were visible, NYPD officials said.

Police required everyone entering Times Square to go through metal detectors and be screened for radiation. Umbrellas, alcohol and big bags were banned. Officers swept nearby hotels, theaters and parking garages, officials said. 

The estimated security cost for New Year’s Eve is $5.2 million, according to the NYPD.

Brooklyn resident Louis Geyer, 55, said he wasn’t scared after hearing about the Istanbul attack.

“You can see the police presence here. That can happen anywhere,” he said. “If it’s going to happen, it’s going to happen. You just don’t know anymore.”

Revelers filled 65 pens stretching to 59th Street — each holding thousands of people. Some people in the pens between 47th and 46th streets on Broadway had enough room to sit down on the street, while others leaned against the metal barricades. 

Bernie Edstein, 48, a coal miner from Australia, was sandwiched between other revelers — including his teenage daughters, Chloe and Kiera — in a pen between 47th and 46th streets on Broadway. They arrived in the United States eight days ago and got to Times Square around 11:30 a.m. Saturday.

“People were pushing and shoving,” Edstein said. “We were getting crushed like sardines.”

For Jamie Bethel, 38, a South Carolina nursing student, New Year’s Eve in New York City has lived up to the hype.

“I always used to see it every year on TV. It looked so fun I wanted to come down,” she said. “It’s exactly as I pictured it. Good music and it feels like I’m at a party. If I had a bathroom, I’d be set.”

With Stefanie Dazio