Alan, an art teacher in his late 40s, began squatting a few months ago when his marriage broke down. He enquired about social housing, but was told none was available. "I was born in London and have lived here all my life but it seems I'm expected to go somewhere else where I know nobody," he says. "Is that what the big society is all about?"

His timing could not have been worse. From Saturday Alan and up to 20,000 other squatters in England and Wales face eviction as police prepare to enforce a radical change to the law which criminalises those occupying residential buildings. Ministers are calling it the "end of squatters' rights" and the first guaranteed protection for home owners.

Squatters' rights organisations say the change in the law is unnecessary when legal remedies already exist for property owners, insisting that most squats are in previously unoccupied premises, while housing charities say that it could trigger a sharp increase in homelessness.

The new offence, introduced under clause 144 of the Legal Aid, Sentencing and Punishment of Offenders Act, will be punishable by up to six months' jail and fines up to £5,000 in England and Wales.

The change in the law affects only residential, not commercial, premises. In a circular sent out to judges, courts and the police, the Ministry of Justice confirms that what are commonly known as "squatters' rights" – preventing forcible entry to an occupied building – will become redundant in relation to residential premises.

The housing minister, Grant Shapps, said: "No longer will there be so-called 'squatters rights'. Instead, from next week, we're tipping the scales of justice back in favour of the homeowner and making the law crystal clear: entering a property with the intention of squatting will be a criminal offence."

To be found guilty of the offence prosecutors will have to prove that a squatter entered the building knowing he or she was a trespasser and intended to remain.

Police are refusing to comment on any plans to embark on evictions over the weekend, but some eviction notices have already been reported in London.

In the east London squat where Alan lives, residents spoke of their fear of eviction. Sixteen people live in the four-storey house which has otherwise been unoccupied for seven years. Water and electricity has been reconnected and is paid for by the squatters. The youngest is a 12-year-old boy who lives there with his father.

A carpet, torn into strips, hangs over the kitchen entrance to reduce noise and keep heat in during winter. Some walls are decorated with murals and graffiti, others are bare and clean having been repainted. The property is awaiting demolition.

Rachel, not her real name, is in her late 20s. She does voluntary work with the NHS. "This house may be classified as residential," she said, "but it's not fit to live in. We had to stop leaks in the roof and replumb the building.

"We want to improve the building so that we can have an agreement with the owners to stay. Unfortunately they won't talk to us. I have never claimed benefits before but I may have to consider it. Suddenly becoming a criminal overnight is tough. Housing is a basic need."

Katie, a supply teacher, lives in a nearby squat. She said: "I have been squatting for a year. I was in an abusive relationship. I didn't have enough money to rent. All the advice agencies said I was not eligible for help because I'm a single person. For me squatting has been a lifeline to escape domestic violence."

Estimates of squatter numbers across the country vary, some suggesting as many as 20,000 people could be displaced.

Phil Gormley, the chief constable of Norfolk who speaks for the Association of Chief Police Officers (ACPO) on uniformed operations, said: "[We] can now act immediately and remove squatters directly from properties in line with the new legislation and ensure people's homes are protected."

Asked whether it planned to begin raids on squats in the capital this weekend, the Metropolitan police declined to comment on "operational" matters. A spokesman said: "[We have] been working with the Ministry of Justice, local authorities and relevant charities regarding implementation of this offence and enforcement.

"Throughout this process the [Metropolitan police] has sought to protect the vulnerable, in terms of the harm caused to homeowners, but also to take full account of the systems that are in place to provide support for the homeless. The MPS will investigate all reports of crime, and where suspects are identified will consider the necessity for arrest."

Squatters groups said police had pasted notices on the doors of squats in London warning that the law is about to change. Myk Zeitlin, a volunteer at the Advisory Service for Squatters, said: "This legislation is badly designed. It is a response to a myth started by sections of the media that people were having their homes squatted while they were out. "There were already laws to cover such non-existent circumstances."

Duncan Shrubsole, director of policy for Crisis, the charity for single homeless people, said: "The majority of people squatting are in empty buildings. Forty percent of homeless people have squatted at some time. We will see street homelessness rise if there's a blitz against squats. It will have a dramatic impact."

Catherine Brogan of Squash, the campaign group which opposed the bill, said: "It's the wrong time to be criminalising homeless people. Rents keep going up. Vulnerable people are being demonised. This will benefit landlords who leave their premises empty."