A drone struck a skyscraper in the World Trade Center complex and became lodged on the building’s facade Monday afternoon, landing the operator in custody, law-enforcement sources told The Post.

The gizmo crashed into 7 World Trade Center around 5 p.m. and ended up wedged between window panels outside the third floor of the 52-story Lower Manhattan building, sources said.

Workers attempted to remove it Monday afternoon.

The drone’s pilot, who is from Texas, was taken into custody by the Port Authority Police Department, sources said.