The NYPD was on high alert as investigators Wednesday questioned a local parolee they believe may have been behind two threatening telephone calls that invoked the Islamic State and warned that cops could be shot, officials said.

The man being questioned is a parolee in the state and has what a law enforcement source said was a minor criminal background. Police wouldn’t identify him but said he turned himself into a state parole office late Wednesday, said an NYPD spokesman.

“We are going to talk to him, we are not saying he said it,” said the spokesman about the threats.

Police said two anonymous calls were made Tuesday — one to officials in Philadelphia and another to the NYPD — in which the callers said another individual wanted to attack cops. Philadelphia police traced their call to an address in upper Manhattan, said NYPD chief of intelligence Thomas Galati.

Galati said there was not enough information for an arrest. Deputy Commissioner for Intelligence John Miller did not elaborate.

The New York call was made to the 32nd Precinct in Upper Manhattan.

In response, the NYPD put out an alert late Tuesday to all officers with the identity of the person of interest.

“We are taking it seriously based on what happened in Philadelphia three weeks ago,” said Galati, referring to a shooting Jan. 7 in which a man claiming allegiance to the Islamic State, which is also known as ISIS, fired at a police officer sitting in a patrol car. The officer, Jessie Hartnett, 33, was wounded in the arm but managed to shoot and wound his attacker, identified as Edward Archer, 30.

advertisement | advertise on newsday

Both Hartnett and Archer have been recovering from their wounds. Officials reportedly have ruled out the possibility that Archer had any ties to terrorism.

Patrolmen’s Benevolent Association president Patrick Lynch Wednesday called on NYPD cops to be alert and cautious.

“Be mindful that any call, regardless of how insignificant it appears to be, may be a set up,” Lynch said in a statement. “Rely on your training and tactics and trust your instincts. Don’t hesitate to call for backup when your gut tells you something is wrong.”