Officers investigate the scene of a shooting in Philadelphia (AP Photo/Joseph Kaczmarek)

The New York Police Department is urging officers to be extra vigilant after attacks on police in Philadelphia and Paris.

An internal memo Friday obtained by The Associated Press titled "officer safety alert" warned police to take proactive safety measures.

A knife-wielding suspect lunched at officers in Paris on Thursday before being shot. Shortly before midnight, a gunman opened fire on an officer in a patrol car in Philadelphia, wounding him.

Philadelphia police officials say Friday the suspect used a stolen gun and was a supporter of the Islamic State group who acted in the name of Islam.

The NYPD memo says the two incidents "demonstrate the continued threat that members of service face from individuals seeking to target law enforcement personnel for a variety of reasons, including terrorist motivations."

Sign up for the Newsletter

Get the best of delivered to your inbox every day.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)