Craig Ruttle, Associated Press
NYPD officers stand for a moment of silence at approximately 2:47 p.m., Tuesday, Dec. 23, 2014, near the site where New York Police Department officers Rafael Ramos and Wenjian Liu were murdered in the Brooklyn borough of New York at 2:47 this past Saturday. Police say Ismaaiyl Brinsley ambushed the two officers in their patrol car in broad daylight Saturday, fatally shooting them before killing himself inside a subway station.

NEW YORK — Police have increased security at some stationhouses and made at least two arrests over threats made since the deadly shootings of two officers last weekend, and the mayor vowed Wednesday to protect officers.

Emergency Services Unit officers were providing additional protection at two Brooklyn precincts, where they were stationed starting Tuesday. Police said Wednesday they were remaining vigilant while investigating the origin of the threats, which they didn't detail.

Meanwhile, an 18-year-old was facing charges of making a terroristic threat after authorities said he put up a menacing photo and message online on Saturday hours after the afternoon ambush of Officers Wenjian Liu and Rafael Ramos by a gunman who had signaled his plans on social media.

Teenager Devon Coley posted a photo on his Facebook page Saturday night of a gunman shooting at a patrol car, symbols showing a gun pointed at an officer's head and a caption with his local precinct's number and "next," according to a court complaint.

His lawyer, Daniel Ades, said Wednesday that the state terroristic-threats law was being misapplied.

"Nobody's condoning threats against police," he said, but "even if this is proven, it doesn't amount to a crime." He noted that the law requires a "reasonable expectation or fear" that a threat meant to influence government or intimidate the public is about to be carried out.

Prosecutors sought $250,000 bail for Coley, who was already facing unrelated gun possession and other charges, the New York Post reported. Court records show a judge released him without bail on the threats charge.

Officials said they had investigated at least a dozen threats against police since the shootings, and that one man had been arrested after walking into a Manhattan stationhouse and saying: "If I punch you in the face, how much time will I get?" and refusing to leave.

Mayor Bill de Blasio denounced the various threats Wednesday and said the city "will protect the men and women who protect us."

"New York City stands with our police officers in this time of tragedy, as we do every day, and our city will not be intimidated by those spouting hateful, violent messages," he said in a statement.