For four decades, the freetown of Christiania has existed as a testimony to an alternative way of life, where hash was sold openly and squatters' shacks jostled comfortably with architect-designed eco-sheds.

For some, the commune was a human jungle in the centre of Copenhagen; for others a bastion of irreverence.

But now residents have erected its last line of defence against the Danish government attempts to "normalise" one of Europe's most famous squats after 40 years of legal wrangling.

Residents have erected fences at entrance points which they patrol, handing out flyers which declare that "Christiania will be temporarily closed until further notice". Cafes and shops were closed as residents began meetings to debate their future.

In what residents see as the final attack by the right-of-centre government, and property developers eager to get their hands on the valuable real estate, they have been given until 2 May to decide whether to take up an offer to buy the properties – collectively or as individuals – for 150m kroner (£18m). Many argue that, for residents who have renounced materialism, this is impossible.

The other deal tabled by the government is to turn the freetown into a public housing association.

For many, the battle has already been lost. In February the government won a legal tussle over the rights of use after the supreme court upheld a 2009 ruling which handed the state control of the area.

Christiania, on the site of an old barracks and home to almost 1,000 people, has become a tourist destination. Cannabis is openly on sale, even if other bans – on arms, hard drugs and insignia on leather jackets – have been imposed by the commune over the years.

Since its creation in 1971 by a group of hippies and squatters, its 34 hectares have become a warren of micro-neighbourhoods, with cutting-edge eco-houses placed alongside restored shacks.

Initially labelled a social experiment by the government, in the last decade the Liberal-Conservative coalition has made a number of attempts to "normalise" the freetown.

Critics argue the area has become a haven for criminals. Earlier this month, police seized almost 1m kroner and 24kg of hash in a raid by more than 100 officers who were met with rocks and molotov cocktails, reported the Copenhagen Post.

Tensions between the state and the commune are long-standing. Four days of demonstrations in 2009 saw 1,500 people arrested after protesters set fire to barricades and hurled fire bombs at riot police, who responded with teargas.

Police were accused of being heavy-handed after using controversial kettle tactics and more than 200 official complaints were filed.

The government has been accused by its rightwing support party, the Danish People's party, of being too generous in its recent offer, but Christiania residents fear any deal would lead to the end of the autonomous enclave.

In the statement handed out at the blocked-off gates, the residents said: "We believe that the ultimatum issued by the Danish government about dividing up Christiania and selling off parts of the land will mean the destruction of the open, self-managed, experimental and socially inclusive Christiania as we know it."

The finance ministry, brokering the deal, has demanded that Christiania reopen. Meanwhile, the police were content to bide their time.

"We will do nothing about the closure," an officer told the Ritzau news agency. "It would seem odd to me if the police were to use force to reopen something we have spent 39-and-a-half years fighting to shut down."