The Clash did it. So did Boy George and, at a decidedly less prosperous stage in his life, billionaire Richard Branson. But as the ranks of those living precariously spike amid a double-dip recession and waves of government cuts, Britain has suddenly declared war on squatting.

Squatting, or the unilateral occupation of at least temporarily vacant property, has been a rite of passage for Britain’s young, down at heel and artistically inclined since at least the psychedelic 1960s. But with evidence that squatter numbers are surging — intruder eviction cases have doubled over the past year in posh London neighborhoods including Knightsbridge and Mayfair — a new law criminalizing the practice came into effect this month that is upending the rebellious and politically charged British subculture.

Armed with legal codes that bound the hands of police and forced landlords into cumbersome civil suits to evict unwanted dwellers, squatters became the bane of the British homeowner. Urban lore tells of families that pop over the English Channel for vacation only to return and find strangers playing house in their home. Vacant, abandoned or second homes are far more classic targets. One squatter in Wales has raised four children over 11 years in a 500-year-old home whose owner died.

Last year, Guy Ritchie, the movie director and Madonna’s ex-husband, fell victim to a rash of squatter takeovers of luxury homes when intruders occupied his $10 million Central London manse as it was undergoing renovation. Under British law, owners and tenants currently living in homes can bring in police if there are obvious signs of forced entry and they can prove they’ve been turned out by invaders. But since his Georgian manor was vacant as workers labored on a renovation, Ritchie had to follow the rules of British Squatter Eviction 101: He had to get a court order before the authorities could touch them.

Yet for the first time since the 1970s, squatters at residential properties are facing forcible evictions without court orders, as well as penalties of up $8,000 and six months in jail. Over the past two weeks, authorities have evicted squatters from flats in London and country cottages in Somerset. Police in riot gear forced through a line of protesters in the beach town of Brighton, entering an occupied home only to find three young squatters had superglued themselves to the attic rafters in an attempt to prevent arrest.

The squatters code here has almost always carried an anti-capitalist message, with empty property portrayed as the moral equivalent of wasting food. The squatter ranks have been boosted, observers say, by the popularity of the recent Occupy movement and Europe’s surging youth unemployment, with squatters describing their growing numbers as an outcrop of the region’s economic crisis.

Aging bohemians and young leftists traditionally make up the heart of the squatter corps. But the new law is adding an extra level of fear to the lives of Londoners like Richard Broadbury.

Last year, the down-on-his-luck fashion photographer joined a growing segment of squatters who are not so much seeking to make a political statement as trying to put a roof over their heads. “It’s not my first choice, no,” joked Broadbury, who is cohabiting an empty East London flat with nine other squatters, all of whom cope daily with spotty electricity and dingy, used mattresses. More seriously, he added: “I’m doing it because I have no other option.”

More finances than politics

Indeed, after years of steady declines, street homelessness in London — known here as “rough sleeping” and defined as spending at least one night on the street during the year — has jumped 54 percent to 5,678 people since 2010.

During the first six months of the year, statistics show that 24,990 Britons requested emergency housing from local governments, an increase of 32 percent from record lows at the beginning of 2010. The numbers mirror similar increases in homelessness in other hard-hit European countries embracing waves of austerity, including Greece and Italy.

Like the outright homeless, Britain’s squatter population, experts say, is filling up with those who are slipping between the cracks of the eroding social safety net here, with housing and other benefits for the poor, for instance, being slashed by the Conservative-led government in the middle of a recession. Observers also cite swells of immigrants who have no legal claim to benefits. At the same time, Britain is facing an acute housing shortage, particularly in London, where average rents for center city apartments top $6,000 a month and prices are still climbing despite the long recession.

“Whichever way you look at it, homelessness is increasing in Britain, primarily because of the lack of affordable homes, the down economy and cuts to benefits,” said Kate Webb, policy officer at the London-based homeless advocacy group Shelter. “What’s really striking is the number of people who are now homeless because their tenancies ended and they can’t afford a new place to stay.”

No official census exists for squatters, and most here say the numbers are not yet near the scale seen in the 1970s, when high-profile locales in central London became home to squatter hives linked to punk and radical labor movements. But last year, the government estimated there were at least 20,000 squatters nationwide, with activist groups claiming figures as high as 50,000.

Conservative legislator Mike Weatherley, who spearheaded the squatter criminalization law, argues that most squatting is not a question of economic need. He said most squatters are occupying property based on antisocial political beliefs. Those in real need of economic assistance, he said, should be aided by charities and the government when necessary.

“A lot of people say that squatting is providing a service, somewhere the homeless can go for shelter,” he said. “But why would you want vulnerable people to be housed in unsafe and precarious squats? That is not how a civilized society behaves.”

Numbered days

The anti-squatters law that went into effect Sept. 1 criminalizes squatting only in residential — as opposed to commercial — property. That has left people like Broadbury in a gray area of the law, given that his commune of squatters is occupying both an empty pub in East London as well as the apartment on the second floor. Nevertheless, he believes that their days at their current squat are numbered.

Broadbury slipped into squatting in November after falling behind on rent for a modest room he rented in the shadow of glistening bank towers at London’s Canary Wharf. His gradual decline began with the closing of his photo studio in 2008 amid a scarcity of clients. Facing high London rents, as well as university debts and credit card bills, Broadbury took up a friend’s offer to join the squatting corps.

Now, he is scouting London for other abandoned properties, looking largely at unused commercial spaces where he is less likely to be immediately evicted. “We have low wages or no jobs, and we’re living in an incredibly expensive city,” he said. “What else are we going to do?”

Karla Adam contributed to this report.