Hundreds of police officers were involved, some of them wearing riot helmets. The overnight hours of Monday into Tuesday were chosen because Zuccotti Park would be at its emptiest. The operation was kept secret from all but a few high-ranking officers, with others initially being told that they were embarking on an exercise.

Police Commissioner Raymond W. Kelly was at the center, his presence underscoring how the operation was fraught with challenges for the Police Department. There could be no repeat of episodes in recent weeks, like the pepper-spraying of protesters, that violated department rules and created a firestorm of public sympathy for the squatters.

And so the police operation to clear Zuccotti Park of protesters unfolded after two weeks of planning and training. Officials had prepared by watching how occupations in other cities played out. A major disaster drill was held on Randalls Island, with an eye toward Zuccotti. Officials increased so-called disorder training — counterterrorism measures that involve moving large numbers of police officers quickly — to focus on Lower Manhattan.

The last training session was on Monday night, on the Manhattan side of the East River. The orders to move into the park came down at the “last minute,” said someone familiar with the orders, which referred to the assignment only as “an exercise.”