Gunshots were fired in Times Square during a fight just after 2 a.m., according to an NYPD spokesman. Credit: Newsday/Matthew Chayes

Gunshots were fired in Times Square during a fight just after 2 a.m. Sunday, according to an NYPD spokesman, as thousands of people nearby celebrated the Knicks’ championship.

Hundreds ran for safety as loud bangs rang out on Broadway north of 42nd Street and police officers ran towards the scene.

Officers then gave chase to two men running toward West 39th Street, catching and detaining them a short time later.

Elsewhere in the city, tens of thousands of people poured into the streets near Greeley Square Park in Midtown moments after the Knicks won Game 5 on Saturday night, clinching the team’s first championship in more than a half-century.

Fans climbed traffic lights and did pull-ups, and drivers honked in celebration as T-shirt vendors appeared with championship clothing ready for sale.

Near Herald Square, about 10 blocks were shut down and full of people. People were buying vuvuzelas and blowing the horn-like noisemakers through the streets.

And about 50 people had climbed onboard a Department of Transportation truck.

The jubilant celebration was marred by school buses vandalized and catching fire, objects hurled at police officers, assaults and more.

A school bus was vandalized near the Port Authority bus terminal...

A school bus was vandalized near the Port Authority bus terminal on 42nd Street and 8th Avenue following the Knicks championship win. Credit: Newsday/Matthew Chayes

NYPD officers in riot helmets and wielding batons tried to contain the crowds as people drank, smoked and sang “New York, New York” and “Empire State of Mind” in a delirious celebration decades in the making.

Multiple people were tearing apart Victor Wembanyama jerseys, some also lighting them on fire as others chanted for them to be burned.

Others jumped on cars, climbed scaffolding and scaled street lights.

Nearby, a LinkNYC kiosk displayed a congratulatory ad to the Knicks.

Closer to Times Square and nearing 1 a.m. Sunday, groups of people climbed atop buses, trucks, kiosks, trash bins, scaffolding and other stationary objects. Midtown was gridlocked, creating a maze for people to get around as police erected barriers and funneled celebrants and others off the roads and onto sidewalks.

An NYPD spokesman said at 12:40 a.m. that there had been arrests but a total number was not immediately available. That statement came before others were seen being detained.

Newsday's Alek Lewis contributed to this story.

A year of vigils against ICE ... Tax break for Nassau vets ... Knicks and free agents Credit: Newsday

Dangerous heat on the way ... Criminal charges for Heuermann therapist ... Tax break for Nassau vets ... LI Works: Sign making

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME