Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The NYPD is recommending that businesses identify “safe rooms” where employees can hide if a shooter invades the workplace — because hiding under the desk is no protection from gunshots.

Det. Kathleen Thompson told a gathering of business leaders, security professionals and media on Thursday that four weapons were tested against the kind of wooden desk typically found in offices.

Bullets from a .38-caliber Smith & Wesson handgun, a 9mm Glock handgun, a 12-gauge Mossburg shotgun, and an AK-47 all crashed through the desk. A better choice of hiding place is behind a file cabinet, which withstood ammunition from all but the AK-47.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"The more layers you have the better protection you have,” Thompson said. “You want to have as many layers between you and that gun."

Thompson said that if workers can get out of the building and away from the shooter quickly, they should do so. But there are times, she said, when “your best option may be not to evacuate."

That’s why the department, which studied 230 “active shooter” events to come up with its recommendations, suggests businesses create safe rooms with thick walls, solid doors, and as few windows as possible.

Those who barricade themselves inside should put their phones on silent, not vibrate, and try to block the door.

Deputy Commissioner for Counterterrorism ‎John Miller said NYPD personnel train for active-shooter situations in facilities designed to look like offices. The department expects its first responding patrol officers ‎to engage with the gunman.

Between 2000 and 2013, 486 people were killed in such attacks — which happen at a pace of one every 3.5 weeks and can involve meticulous preparation by the perpetrators.

"Even with emotionally disturbed people ... a lot of them demonstrate a high degree of careful planning during the incident,” Miller said. “They manage to stay fairly organized."