Twenty years on from the fox hunting ban, MSPs have backed new legislation which limits hunts involving packs of dogs.
The Scottish government says its Hunting with Dogs Bill will end illegal hunts by closing a loophole in the law.
But animal welfare campaigners have warned that a licensing scheme will create a new loophole which could be exploited by hunters.
Land managers have argued the bill is unnecessary and impracticable.
MSPs voted in favour on the proposals on Tuesday, with 90 in favour and 30 opposed.
The Hunting with Dogs Bill is designed to make the law clearer and close loopholes which allow the practice of killing wild mammals - including foxes, rabbits and hares - with packs of dogs.
It repeals and replaces the Protection of Wild Mammals Act, which was passed in 2002, and means hunters will no longer be able to use packs of hounds to flush out wild mammals unless they have a licence.
The original legislation allowed dogs to flush foxes out from cover as long as they were then shot, and providing the hunt was to protect livestock or ground-nesting birds, or to prevent the spread of disease.
Many animal rights organisations felt it was being exploited and a review conducted by Lord Bonomy in 2015 recommended changes.
Environment Minister Mairi McAllan piloted the new bill through parliament.
She told BBC Scotland: "The chasing and killing of a wild mammal with a dog, for sport, or otherwise, has no place in modern Scotland.
"It's been illegal for 20 years, but deficiencies in the previous legislation have led to concerns that it persists.
"This bill is about closing those loopholes, preventing others from opening and finally ending illegal hunting with dogs in Scotland."
Under the new bill, it remains an offence to chase and or kill a wild mammal using a dog, but the wording of the 2002 act is updated to make the law easier to understand and enforce.
The key change is that no more than two dogs can be used to stalk or flush out animals from cover unless a licence has been granted.
The rules also prohibit trail hunting, where dogs follow an animal-based scent.
Farmers, land managers and conservation groups have warned there are some terrains, on hills and in forests, where it would be impossible to hunt with only two dogs.
Jake Swindells, from the Countryside Alliance, believes the new law is unnecessary.
He said: "It's key that we have access to a workable licence to use more than two dogs, for conservation reasons and for protection of livestock.
"A lot of people's livelihoods depend on this."
Claire Bellamy, master of hounds for the Lauderdale Hunt in the Borders, told BBC Scotland that the two-hounds rule was "not viable" because foxes were forced out of hiding by the sound of packs of dogs running.
She said: "That then pushes them out the cover to be able to be shot. Whereas two hounds, it's not going to happen."
But the director of the League Against Cruel Sports Scotland, Robbie Marsland, is worried about how the licence will work.
He said: "We will be arguing that it should be extremely robust, extremely limited, and extremely rare, and that the standards that you have to pass will be very, very high before you get that licence."
The law to ban foxhunting was controversial from the moment it was first proposed at the turn of the century. There were so many protests outside parliament that security had to be increased for the final vote.
The Holyrood committee scrutinising the legislation thought it was unworkable and recommended it should be ditched. But parliament decided to press ahead with the bill and try to fix it.
The result was a law that came with a gaping loophole.
The government recognises that farmers need to be able to protect their livestock and so the new bill includes a licensing scheme to allow more dogs to be used in certain circumstances. Critics believe that is simply creating a new loophole.
Twenty years on, opinion remains divided.
Green MSP Ariane Burgess tried but failed to have the licensing scheme removed from the bill.
She told BBC Scotland the vast majority of Scots want fox hunting to be banned "because it is such a cruel activity".
She added: "Imagine a live sentient being ripped apart by dogs."
Scottish Labour support the new legislation, but rural affairs spokesperson Colin Smyth said his party had concerns about some of the provisions.
He agreed it creates new loopholes by allowing packs of dogs to be used for hunting via a licence.
"But the reality is you cannot license cruelty," the MSP told BBC Scotland.
Rachael Hamilton, Scottish Conservative rural affairs spokesperson, pointed to conservation concerns, arguing farmers should be able to do their job "without too much bureaucracy".
"If farmers need to protect ground-nesting birds, that they are able to do so without being too restricted by an inflexible licensing scheme," she said.