On an unseasonably sunny Saturday this fall, Freetown Christiania, a semiautonomous commune spread across 74 acres in the heart of Copenhagen, Denmark, crackled with life. A man wove through the crowds on his bicycle, selling freshly made sushi rolls; street-market stalls were bursting with colorful clothing, tapestries and glass bongs; and at the center of it all, men illegally hawked cannabis from wooden stalls lining an area known as Pusher Street.

“This is paradise,” a tourist told her friend as they surveyed the scene.

But tensions lurked beneath the joyous surface.

Founded in 1971 by squatters on an abandoned military base, Christiania was devised as a post-’60s anarchistic utopia, where people could live outside of Denmark’s market economy, free to build their houses where and how they wanted, to sell marijuana for a living, and to live as they pleased as long as they didn’t harm their neighbors. Denmark’s government oscillated between attempting, without much success, to bring the community to heel or turning a blind eye as Christianites flouted property laws and drug laws. But now, after 50 years, with worsening gang violence and fresh attempts by the government to normalize the commune, some residents see their dream of an alternative society fading.

The infamous Pusher Street, once operated mostly by residents but now overrun by gangs, may be the first domino to fall. And over the next decade, Christiania’s roughly 900 residents may have to accommodate 15,000 square meters of new public housing and hundreds of new neighbors, according to a tentative agreement with the state that would afford the community the chance to buy the entire 74-acre site from the Danish government.

Some residents fear that the new housing will signal the end of Christiania’s self-governance, and possibly its communal spirit. The only solution to the escalating gang violence, they say, is for the government to legalize marijuana (though harder drugs can also be procured on Pusher Street). Others, who consider Pusher Street a blight, believe the community should embrace the public-housing plan and allow the government to shut down Pusher Street once and for all — something the police have failed to do despite numerous attempts over the years, in part because until this year, Christianites refused to cooperate with them.

“This place was really anarchistic,” said Ole Lykke, 77, who has lived in Christiania since 1980 and runs the commune’s archive. “You could do whatever you wanted as long as you didn’t disturb others, and there was a feeling of community.”

Now Mr. Lykke sees an end to the experiment looming on the horizon: “I think in five, seven or eight years, Christiania will not be Christiania anymore.”

Sitting outside the local brewery that he co-owns, Carl Oskar Strange eyed the drug dealers on Pusher Street from beneath his cap. “They’re a cancer for Christiania,” he said. Two weeks earlier, a shooting on the street had left four people injured and one man dead.

Mr. Strange, 34, has lived in this semiautonomous zone, which occupies a curving strip of land on the Copenhagen island of Amager, his entire life. “Growing up in Christiania was the best childhood ever,” Mr. Strange said. “We had freedom. Pusher Street was very nice back then.”

But the dealers have changed, he said. As he spoke, a tourist approached and offered Mr. Strange a half-smoked joint. He took it and sucked down a long drag before he continued speaking. “Five to seven years ago they got much tougher,” he said. “Now they only want profit. They don’t bring good vibes.”

Christiania has long embraced cannabis while shunning more dangerous substances. But as gangs overtook the drug trade, harder drugs made their way in, along with some of the violence that underpins organized crime. After the recent shooting, Christiania’s residents, who operate a consensus democracy where decisions are made by unanimous assent in town-hall-style meetings, settled on two conclusions: that Pusher Street should be shuttered permanently, and that the state should intervene — an extraordinary step for the anti-establishment community.

“This has never happened,” said Mette Prag, 59, an architect and spokeswoman for Christiania, and a resident since 1987. Ms. Prag was seated on her porch, a charming grassy knoll behind her. Though her house is about a five-minute walk from Pusher Street, it feels a world away, quiet and pastoral.

“The decision showed how fed up a lot of us are,” she said, pouring a glass of rhubarb juice. “It showed that you have to choose: Are you in or out? Also, a lot of people saw the shooting. The street was full, and they were shooting into the crowd.”

The incident followed a stabbing and an assault this spring, fatal shootings in 2021 and 2022, and one in 2016, when two police officers and a bystander were hit. Police crackdowns began in 2004 and have escalated in recent years. Sophie Hæstorp Andersen, the mayor of Copenhagen, said the police attempted to shut down Pusher Street more than 100 times in 2022. “But when they leave, it comes right back,” she said.

“When the police started to intervene more regularly and more often, a lot of people who were bridging the market into Christiania were imprisoned,” Ms. Hæstorp Andersen said. “This left a gap where some of the gangs could get into the scene.” Some of the gangs are suspected to be coming from Sweden, where organized crime has risen significantly.

This summer, the mayor said, she received signals from the Christianites that, after half a century, they finally wanted outside help. In early August, in the middle of the night, several dozen residents descended on Pusher Street to raze the drug stalls and block entrances with large containers. The stalls were back up and running hours later.

In a statement on Facebook, residents wrote that they felt powerless against the might of gangs. “We are ordinary people who have to go to work and pack lunchboxes for our children,” the statement said. “The gangs are ready to use violence and kill people in order to protect their income and territories.”

Mr. Lykke, the archivist, spends his days in several brightly colored rooms filled with rows of files, books, newspaper clippings and posters that document Christiania’s history. He smoked a cigarette with one hand as he leafed through the yellowed pages of the newspaper article from 1971 that inspired the formation of Christiania. “The mafia doesn’t listen to anybody,” he said. “The idea behind Christiania is openness and honesty. Mafia is the opposite.”

Andreas Bennetzen, 48, a musician who has lived here for 14 years, used to come to the area with friends for concerts when he was a teenager. “I remember walking into the place and feeling a sense of freedom, like everything is possible,” he said. But now the escalating violence on Pusher Street has created “a constant crisis situation that we have to deal with.”

Mr. Bennetzen has been involved in several of the attempts to close down Pusher Street, but he sees these as mostly symbolic. “We can close it down as much as we want, but the only solution is legalization,” he said, referring to marijuana.

Ms. Hæstorp Andersen, the mayor, said she is in favor of legalizing cannabis, but that her position runs counter to her party’s official stance in Parliament. In September, Denmark’s Justice Ministry announced a plan to create a penalty zone in Christiania where people caught with cannabis would be fined on a scale.

“People in Christiania are all people who didn’t fit into society somehow,” said Marios Orozco, 61, who has lived in here since 1981 and was once a dealer on Pusher Street. “What they have in common is that they don’t care what people think of them.”

Residents may have little interest in hierarchies or societal norms, but they live with plenty of rules and organizational structures. Hard drugs and violence are banned. Rent and mortgage payments — whether someone lives in a converted barracks, a building shaped like a small spaceship or a ramshackle house with dandelions painted on it — are calculated in part according to the size of their dwelling, at 32 Danish kroner, or about $4.67, per square meter per month. The community also charges what amounts to a monthly membership fee of 1,350 Danish kroner, or $196, for running Christiania, which helps pay the salaries of electricians, gardeners and garbage collectors, among others.

In the early years, Mr. Orozco said, “you might find a house that was really run down, you would move in and fix it up, and then you’re there, and no one could do anything about it. Or you could take a trailer and roll into Christiania in the dark.”

Now, permits must be secured for construction, and structures must be built to last decades. (In the past, said Ms. Prag, the community spokeswoman, she built additions to her house with the expectation that Christiania could be gone in a few years.) Applicants for available homes in the community undergo interviews with their potential neighbors.

In 2011, on the heels of a supreme court decision confirming that the state had control over Christiania, the Danish government and Christianites reached the agreement by which the residents formed a foundation that purchased one-fourth of Christiania’s land, and began paying a fixed rent on the rest.

Now the residents want to buy the remainder for 67 million Danish kroner, or about $9.5 million, but they can’t without submitting to a critical element of the agreement — the construction of 15,000 square meters of public housing over the next decade for a city that desperately needs it. In recent years, Copenhagen’s housing supply has lagged behind its growing population, according to a report from Copenhagen Economics, a consulting firm. The report warns that rising rents and home prices in urban areas could result in “low-income groups being squeezed out.”

Mette Kierkgaard, a member of the Danish parliament and the Minister for Senior Citizens, under whose purview the agreement with Christiania falls, said via email that “the overarching goal of the agreement is to foster positive development in the Christiania area and provide more affordable housing. I find the agreement promising, and I eagerly anticipate monitoring progress in Christiania.”

But some residents worry that they lack the space for the housing. (About 75 percent of the land in Christiania is protected and cannot be developed, according to the Ministry of Social Affairs, Housing and Senior Citizens.)

“Nobody knows where all these houses can be built,” Mr. Lykke said. “We’re talking about an area the size of 1,000 normal-sized shipping containers. In my nightmares, I see 1,000 containers falling down from the sky, landing in Christiania.”

Residents also would lose the authority to decide who moves in. And questions abound. For example: Will the newcomers embrace the time-consuming aspects of consensus democracy? “It’s hard to sit in these consensus meetings for four or five hours without getting restless,” Mr. Strange said.

Others think the new housing could be an opportunity to reimagine the community’s future.

“This could be Christiania’s chance to redefine themselves after 50 years,” said Alex Hummel Lee, 45, an assistant professor at The Royal Danish Academy, Institute of Architecture, Urbanism and Landscape in Copenhagen. This year he had his students create proposals for the public housing that would integrate Christiania’s needs and values.

“It really is an insular place,” Mr. Hummel Lee said. “A lot of social dynamics become difficult.”

Mr. Strange, for one, believes the new housing will bring more opportunities and fresh energy to the commune as it embarks on a new era. “The brewery will have more customers, the newcomers will bring families and kids. We could start a youth team for the football club,” he said. “We’ll be able to grow.”