It was meant to be an imaginative way of hammering home the message that some householders are making life too easy for burglars. But police were under fire today after admitting they had been sneaking into people's homes through open doors and windows and gathering up their valuables into "swag" bags.

Officers in Exeter –who left the swag behind, together with crime prevention information – found more than 50 unsecured properties and claimed people had been glad to receive the wake-up call and advice. But not all residents were happy and a criminal lawyer suggested that the police may have been guilty of trespass.

One resident, Mike Parsons, said: "Since when have members of the constabulary been allowed to enter into someone's private property uninvited and without a warrant? How long before a police officer is attacked and fatally wounded by a worried householder who hears a noise downstairs and then attacks the intruder? This is trespass plain and simple."

Neil Scott, a criminal lawyer, of Foot Anstey solicitors, said: "I have never heard of anything like this before and it seems to be incredibly risky.

No one has an automatic right of entry to someone else's property without consent. That applies to police officers and members of the public, and whether it is unsecured is irrelevant. Police need a warrant from a magistrates court if they wish to do this, or they may enter a property if they believe an offence is being committed. To my mind, if they have entered properties like this, they are trespassers. Trespassing is not a criminal offence but it is considered a civil wrong and could be pursued through the courts as such."

He added: "What if one of the homeowners goes on to claim something has gone missing while the officers were in the property? There is a risk of an accusation of burglary. And everyone is entitled to use reasonable force to defend their property from intruders. Conceivably an officer could have been attacked."

Devon and Cornwall police said the operation was launched after a "spike" in burglaries, mainly at student accommodation. Officers had encouraged householders to take security more seriously but warnings were not heeded.

Other forces have tried initiatives such as rattling windows and trying doors then shouting to residents – sometimes waking them up – to warn them they may be at risk.

Officers decided a more "innovative approach" was needed and the "swag" campaign was launched.

PC Rob Bolt, neighbourhood beat manager, said: "Officers were able to walk into people's homes and place the swag bags in their properties while we could hear them upstairs. We were expecting to find some insecure properties but were amazed by the number that were identified." Officers are dedicated to catching offenders but if we can stop the crime occurring then we can prevent members of the public from becoming victims of crime.

"While we do not want to create an atmosphere of fear, it is important that occupants are aware that currently most burglaries are occurring through insecure windows and doors. Even if you are in the house, a burglar will still seize the opportunity to open your door and see if anything is in view."

Around 16 officers have been carrying out the "burglaries" supported by officials from Communities Together, which brings together other groups and agencies.

Police said the officers involved were in uniform to allay the fears of residents if they suddenly came across one of the intruders.

Matthew Elliott, the chief executive of the TaxPayers' Alliance, criticised the campaign.

"Officers are there to enforce the law but that does not mean that they are above it. Taxpayers want their money to be spent on police going out fighting the real criminals, not breaking into ordinary, law-abiding people's houses and telling them what to do."

A spokesman said: "This initiative was carried out with the best of intentions. However we do accept that our actions of entering properties to leave the bags could be deemed as trespass.

"This was a one-off initiative which we will not be repeating."

To date the force has received no complaints from any of the residents concerned.