Local police departments stepped up their patrols Sunday after three law enforcement officers were killed and three others were injured in a shooting in Baton Rouge, Louisiana.

Nassau County officials have ordered that there will be two officers present in each patrol vehicle as department officials assess “national and local threat levels” in coordination with “federal and local authorities,” according to a news release issued yesterday.

The department “is taking all steps necessary to ensure the safety of the public and its Police Officers,” the statement said.

Nassau police officials said there will be beefed-up patrols “in areas of mass transit, public gatherings and near critical infrastructure,” according to the statement.

In Suffolk County, “additional counter measures were immediately implemented after this attack to ensure the safety of our police officers and the citizens of Suffolk County,” according to a statement issued by the department. The Suffolk County Police Department is “in close contact with our law enforcement partners, including the FBI, receiving intelligence and updates on this attack. Modifications to our posture will be implemented as necessary,” according to the statement.

Officials from the New York Police Department said cops will continue to patrol in pairs and will be positioned outside station houses.

Speaking on the CBS Evening News, NYPD Commissioner William Bratton said cops are in “uncharted waters.”

“I think its quite clear that we are in perilous times — the country and the police profession,” Bratton said. “Policing in America is getting a lot more difficult.”

But Bratton added that cops have “stood up to” difficult situations in the past and “we will work very hard to stand up to them again.”

advertisement | advertise on newsday

Suffolk County Executive Steve Bellone and Nassau County Executive Edward Mangano ordered that U.S. flags be flown at half-staff because of the Baton Rouge police deaths.

Police officers across the United States were already on heightened alert after five officers were shot and killed in Dallas on July 7. Two black men were fatally shot by police earlier that week — Alton Sterling in Baton Rouge and Philando Castile in Falcon Heights, Minnesota.

The shootings have led to protests and exacerbated tensions between members of law enforcement and the black community.

In a statement, Gov. Andrew M. Cuomo said: “The tragic events of the last few weeks — from Falcon Heights to Dallas to Baton Rouge — are deeply troubling and cannot be allowed to persist. We must not let fear and intolerance overtake our better angels. We must instead choose unity. It is in our darkest moments that we must show our greatest strength.”

With Anthony M. DeStefano and Alison Fox