DENVER — A park in front of the State Capitol that had been the scene for close to three weeks of a protest encampment allied with the Occupy Wall Street movement was cleared by police officers in riot gear early Friday morning. The police said 24 people had been arrested after refusing orders to disperse.

The police action, though expected by the protesters, came in the chill darkness of early morning, with flashing lights, black-clad officers and a blaring public address announcement that the park was being “closed until further notice.”

The police in other cities where protests have spread have not yet sought to dismantle them — though in some cities, like Boston, the police have moved to stop the protest from expanding to additional locations. Gov. John Hickenlooper appears to be the first state leader to take such an aggressive stance.

Mr. Hickenlooper, a Democrat who has been under increasing pressure to take action against the ramshackle tent encampment, met with protesters on Thursday before announcing that they would have to leave the park by 11 p.m.