Animal welfare reforms which will lead to a total ban on the docking of dogs' tails has been backed at Holyrood despite protests from campaigners.
Penalties for mistreatment will reach £20,000
MSPs unanimously endorsed the general principles of the Animal Health and Welfare Bill.
Protesters gathered outside Holyrood to call for working dogs to be made exempt from the tail docking ban.
The bill will also allow inspectors to take pre-emptive action to remove animals in danger.
Representatives from a number of organisations, including the Scottish Countryside Alliance, the Scottish Kennel Club and the Scottish Working Dogs Association were at the demonstrations.
They have argued that tail docking remains necessary to prevent harm to working dogs.
There had also been controversy over the extra powers the bill could give to ministers to cull cattle, sheep or poultry in the case of an outbreak of disease.
The bill places a duty of care on all animal owners and extends to making sure horses do not eat ragwort in their fields.
Offering animals as prizes in competitions will no longer be allowed and the docking of all dogs' tails will be banned.
Dog fights are already illegal, but the continuing practice of making and selling videos of dog fights will become an offence.
Opposition to ban
The minimum age someone can buy a pet will be raised from 12 to 16 and maximum penalties for cruelty to animals will be increased to a fine of £20,000 or 12 months in prison.
Speaking in parliament, Rural Affairs Minister Ross Finnie said: "The docking of dogs' tails is a controversial practice, currently permissible by law when undertaken by a veterinary surgeon.
"We proposed initially to exempt working dogs from the ban. However, we have been persuaded by the evidence provided that this exemption is not necessary and I intend to prohibit the tail docking of all dogs."
Campaigners gathered at Holyrood to protest against a total ban
However, farmers and countryside campaigners have objected to the increased powers the bill gives ministers to order the slaughter of animals in case of an outbreak of foot and mouth disease or bird flu.
The Scottish National Party and the Conservatives called for guarantees that scientific and veterinary experts would be consulted before these powers were used.
Mr Finnie said: "We live in a world in which the risk of an outbreak of an exotic animal disease, regrettably, is ever-present."
Lessons had been learned from the foot-and-mouth outbreak of 2001, the minister added.
Scottish Tory agriculture spokesman Alex Fergusson criticised the ban on all tail docking.
The Galloway and Upper Nithsdale MSP said there was a huge difference between the cosmetic docking of entire tails and the shortening of the tails of working dogs.
In the latter, Mr Fergusson said between a third and a half of the tail was removed.
"Its purpose is not to be fashionable, it is to be practical," he said.
"It is not to be cruel, it is to prevent future harm and distress."
Labour MSP Irene Oldfather called for further debate on how the bill's duty of care could protect animals used in circuses, including their mental welfare.