The NYPD put officers on alert Friday, advising them to take precautions after attacks on police in Paris and Philadelphia.

In a message sent electronically to all police commands shortly after noon, NYPD Chief James Waters, head of counterterrorism, told cops to “exercise heightened vigilance” and take “proactive measures” in the wake of the attacks.

In the Paris attack on Thursday, a man with a knife attempted to assault cops standing outside a police station. The attacker was shot dead by the officers.

Waters said an investigation revealed that the attacker was wearing a fake suicide vest and had in his possession a piece of paper bearing the flag of the Islamic State group, also known as ISIL or ISIS.

On Thursday night in Philadelphia, a man stepped up to a police car where Officer Jessie Hartnett, 33, was sitting and began shooting at the cop.

The man fired 13 shots at Hartnett, who, despite being wounded, managed to get out of the vehicle and return fire.

Hartnett was recovering Friday in stable condition, while the wounded gunman was treated and released into police custody. According to news reports, the suspect pledged allegiance to ISIL during a police interrogation.

With AP

Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break. Credit: Newsday/Howard Schnapp, Kendall Rodriguez; Gary Licker

Things to do now on LI Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break.

Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break. Credit: Newsday/Howard Schnapp, Kendall Rodriguez; Gary Licker

Things to do now on LI Rock climbing? Indoor beach volleyball? Water parks? Arts and crafts? NewsdayTV's Elisa DiStefano and Newsday deputy lifestyle editor Meghan Giannotta have your look at ways to spend your winter break.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME