The barn-like structure, called the People’s Pentagon, was put together early Sunday morning.

Not seemingly content with just living in tents over the last two months, Occupy D.C. protesters erected a wooden barn-like structure in McPherson Square early Sunday morning, provoking a nine-hour standoff with U.S. Park Police that ended in the arrest of 31 people.

The incident marked the single highest tally of arrests since the occupiers took the park and could substantially reshape the easy-going relationship they’ve had with local police. It also showed the ever-evolving ingenuity of the protesters, who have developed means and mechanisms for just about everything from a well-stocked library and kitchen to mobile communications units that allow them to publicize their aims and actions in real-time.

Protesters hoped that the 17-foot-tall structure, which was made from pre-fabricated pieces and was meant to mimic the Pentagon’s architecture, could serve a shelter and a meeting space for the colder months. Park Police, though, felt otherwise; they claimed that it was a permanent structure, and gave protesters an hour to start dismantling it on Sunday morning.

Not content with that option, the protesters, who argued that the structure had no foundation and was therefore temporary and permitted, holed up within and on top of the frame as the afternoon went on. Park Police established a perimeter around the structure — a number of people were arrested trying to cross police lines — and eventually brought in metal barriers to separate a growing crowd from the barn-bound occupiers.

With the sun setting on the encampment, Park Police negotiators requested that a city building inspector asses the structure; after a brief walk around it, he ruled that it was unsafe for occupancy and affixed bright orange decals to it condemning it. The D.C. Department of Consumer Affairs told DCist that the structure suffered from “multiple code violations; major one was lack of structure being attached to anything to keep it secure.” Predictably, protesters vehemently disagreed.

After three warnings, Park Police peacefully arrested the majority of the occupiers within the structure, but six remained on the roof and refused to come down. Faced with a testy crowd and uncooperative protesters, Park Police inflated a large air bag along the back side of the barn and pulled a truck alongside the front. Two protesters agreed to come down voluntarily, jumping into the air bag; the four that were left were less amenable to coming down willingly.

Police then used a cherry picker, harnesses and rope to remove three of the protesters, a fourth was removed more forcefully when he refused to let go of the structure’s frame. Before being taken down, he urinated from the structure, provoking cheers from the crowd. The move may not have been particularly wise, though — the Post’s Tim Craig reports that he faces charges of disobeying a lawful order, resisting arrest, indecent exposure and public urination. (The majority of those arrested were released within a few hours.)

By 9 p.m., police had dismantled the structure altogether.

Since setting up camp in McPherson Square in October, the protesters and the National Park Service (and Park Police) charged with overseeing the federal park have settled into a peaceful, though tenuous relationship.

While the Park Service has said that camping is technically illegal, it has permitted protesters to erect temporary structures that have grown more elaborate with the passing months. (Just before Thanksgiving, the Park Service posted another notice warning campers that what they were doing was illegal, but no enforcement actions have yet been taken as in other cities.)

At the same time, the Metropolitan Police Department has largely extended the occupiers the same flexibility and courtesy when they’ve marched through the streets of the District, regularly stopping traffic along routes and escorting them along often circuitous weekly marches.

Those relationships may change from now on.

D.C. officials, including Mayor Vince Gray and the majority of the D.C. Council, have looked upon the occupiers with some sympathy, though they have stressed that they should remain within the bounds of the law. (Gray and D.C. Police Chief Cathy Lanier were none-too-happy when protesters blocked doors at the Convention Center last month.)

Yesterday’s “revolutionary barn-raising” may cause police — both MPD and the Park Police — to reassess their tactics and willingness to defer so broadly to the occupiers. This is only the second time police have made large-scale arrests related to the local branch of the local Occupy movement; three weeks ago, 13 people were arrested after having entered the Franklin School.

Efforts like the barn-raising offer both risk and reward for the movement. While the crowd grew more energized as the hours ticked by, some questioned the wisdom of putting up such a big fight over a 12-hour-old barn that could well risk the security of the larger encampment. (Police have indicated that they’ll allow the campers to remain.)

Moreover, most District residents and visitors have seemed nonplussed by the occupiers to date; with this escalation, they may become less tolerant, especially considering that police have not resorted to violent tactics to suppress protesters as happened in other cities.

As they have since the occupations at McPherson Square and Freedom Plaza began, police remained generally restrained throughout last night’s standoff. They didn’t make life for the media particularly easy, though, moving reporters from a spot near the barn where arrests could have been observed and then back-lighting the entire structure with a floodlight, making photography and video difficult.