Authorities in New York City and Nassau and Suffolk counties have increased counterterrorism patrols and are monitoring developments, just hours after the worst mass shooting in the nation’s history, a case deemed terror-related in Orlando, Florida.

“We are in contact with law enforcement authorities in Florida, as well as the FBI, and we are closely monitoring developments in the investigation,” said Stephen Davis, the NYPD’s deputy commissioner for public information. He said the department placed its patrol and counterterrorism resources — including the critical response command, strategic response group and emergency service unit — “on alert pending further information.”

NYPD Chief of Department James O’Neill said that over the next few days, New Yorkers can expect to “see increased uniform presence in nightlife throughout the city, in crowded venues.

“We will be working with the LGBT community, not just in Manhattan, in the outer boroughs also, to make sure that we deploy properly to make people not only safe, but to feel safe throughout the city. And that’s what we do so well.”

The NYPD’s counterterrorism chief, James Waters, said the department — for now — will defer to the Orlando investigation. “Right now we are going to let the Orlando police and the FBI down in Florida conduct the investigation,” he said. “As it warrants, they will send us leads if they need us to check out anything.”

The NYPD said it has more than 500 officers “dedicated solely to terror response, hundreds more to the prevention of incidents, and is constantly working with law enforcement and community partners to counter terror.”

New York City Mayor Bill de Blasio said all flags should be flown at half-staff and the city will light City Hall in rainbow colors to represent LGBT pride at sunset.

With David M. Schwartz and Rachel Uda