WASHINGTON (AFP) - Police arrested 31 protesters late Sunday at an anti-Wall Street encampment in Washington and tore down the wooden shelter that activists had illegally erected overnight, prompting a nine-hour confrontation. Officers on foot and horseback converged on McPherson Square, near the White House and where demonstrators have been living since late September, leading several activists to climb on to the structure and refuse to come down. After making dozens of arrests near the 25-feet (eight meters) tall, roofless hut, US Park Police deployed an armored car and motorized lift to try to remove six hardy demonstrators who had clung on limpet-like to the shelter. Ladders were then used to ease down the last protester who for more than 30 minutes held off five officers who had tried to attach a rope to his body to lift him off the building. But he was eventually prised off its beams, and a fork-lift truck later moved in and flattened the structure. A crowd of around 400 people had gathered to watch the unfolding spectacle and many of them shouted "shame on you" at police as arrests were made at the site while also chanting that "liberty and justice would prevail." Despite moves to evict "Occupy" protesters from similar camps in New York and other cities, authorities in the US capital have generally refrained from taking action against the village of tents and tarps that has sprung up here. But the erection of a wooden building, against park regulations, prompted officers to swarm into the square around 11:30 am, and the standoff ensued. Sergeant David Schlosser, a park police spokesman, told AFP that 31 people were arrested and charged - 15 of them for crossing a police line and 16 for defying police orders. A police officer at the scene said earlier that the people who had climbed on to the structure's wooden beams were given three warnings that they were subject to arrest. The park police were backed by District of Columbia officers who surrounded the square, the focal point of Occupy DC, and sealed off surrounding streets. Protesters were split on the merits of building the wooden shelter frame that led to Sunday's standoff with city authorities. Angelica Gatewood said the structure was meant to be "an emergency heating shelter for the winter," which is just beginning to bite in Washington, but another protester said it was jeopardizing Occupy DC's aims. "This building was an effort to provide winter quarters but nevertheless it may have put the rest of the camp at risk," said Jim Fussell, a 49-year-old father of two from Arlington, Virginia. Matthew Patterson, 26, who has a home in Washington but spends two nights a week in a tent at McPherson Square, meanwhile said after the shelter had been removed that it was erected to provide a place for meetings and discussions. "It was not built to attract police and media attention, but to keep people warm," he added. The anti-Wall Street movement, born in New York in mid-September, is trying to redefine itself, as permission to camp in public spaces is being rapidly curtailed. The loosely organized, left-leaning Occupy Wall Street protesters insist they are exercising their freedom of speech in the run-up to November 2012 national elections. Along with the Zuccotti Park eviction in November, police cleared out protesters this week in Los Angeles and Philadelphia. There have also been evictions in Dallas, New Orleans, Oakland and Portland, and some clashes with police.