Dog owners will be safe from prosecution under revised dangerous dogs laws if their pet attacks someone trespassing in their home - even if the "intruder" is doing a good turn.
Ministers say dogs cannot be expected to "ascertain the intentions" of those entering a property before reacting.
The clarification comes in response to MPs who are scrutinising proposals to update the law in England and Wales.
The government plans to extend existing laws to cover dog attacks in homes.
It is currently updating the controversial 1991 Dangerous Dogs Act.
At present, the act covers only attacks by dogs in public places and private areas where animals are banned from being - such as a neighbour's garden or a park.
The change would extend the scope of the law to enable a prosecution to be brought against anyone whose dog injures someone, or acts aggressively, in a private place where they are permitted to be, such as the owner's home.
But dog owners will not be able to be prosecuted if the victim was trespassing in their home.
In a response to MPs on the Environment, Food and Rural Affairs Committee - which has made a number of recommendations to ministers - the government rejected the idea of a similar exemption in relation to attacks on people trespassing in gardens or outhouses.
"A child retrieving a ball from a garden, or a neighbour retrieving garden cuttings, should be protected from dog attacks," officials said.
"Such a distinction reflects the higher likelihood of a trespasser inside or entering a dwelling having malign intent," the response added.
But it confirmed, under the government's plans, no offence would be committed if a dog was "dangerously out of control in relation to a trespasser who is in, or in the process of entering a dwelling, regardless of the intention of the trespasser".
The committee has previously called for an assurance for homeowners that they would be protected in the event of attacks on trespassers when they were not at home.
Earlier this year parents of children who were killed by dogs delivered a petition to Downing Street calling for action to prevent attacks.
More than 200,000 people a year are estimated to be bitten by dogs in England, based on research for the British Medical Journal.
The government says it is under "significant pressure" to change the law "as soon as possible". The consultation suggested the owners of killer dogs could face life in prison.