Elite NYPD cops were forced to spend Wednesday morning inspecting and dismantling guerrilla art installations around the city depicting children confined in metal cages — and department insiders were furious the officers were diverted from more important duties.

At least 18 identical installations — a commentary on the Mexican border crisis — popped up in the wee hours at prominent locations across Manhattan and Brooklyn, including the Barclays Center, Mayor Bill de Blasio’s Park Slope YMCA and the offices of several news outlets, including The Post, police sources said.

The first of the installations — 3-by-5 chain-link boxes holding dummy “children” and bearing signs reading #NoKidsInCages, accompanied by a looped audio recording of a crying tot — was reported to cops around 4:40 a.m., authorities said.

The pieces drew massive police responses, including members of the department’s top-tier Emergency Service Unit and patrol cops who had to secure the area, sources said.

“It was a waste of time and resources,” fumed one high-ranking source, explaining that cops had to use an abundance of caution to make sure the cages weren’t rigged with explosives. “ESU had to go to every one of them to make sure they weren’t dangerous.

“And it was just a damn stunt.”

The installations were dropped off by a white box truck, which cops are working to track down.

“We want to talk to whoever did this,” said the source. “They’re not little cages, they’re big.”

The NYPD said no one had claimed responsibility for the pieces, but a Twitter account first used around 6:45 a.m. Wednesday, @NoKidsInCagesUS, posted several photos of the cages around New York.

An associated website links the movement to Texas-based RAICES, the Refugee and Immigrant Center for Education and Legal Services.

RAICES did not immediately respond to a request for comment.