Scotland will become the first country in the world to introduce minimum unit pricing for alcohol.
Supreme Court justices gave their backing to the controversial measure in what ministers in Edinburgh hailed as an "historic and far-reaching judgment".
Seven justices at the UK's highest court dismissed a legal challenge that had been brought against minimum unit pricing by the Scotch Whisky Association (SWA).
The decision clears the way for the Scottish Government to bring in the policy more than five years after MSPs passed legislation for it.
First Minister Nicola Sturgeon said: "Absolutely delighted that minimum pricing has been upheld by the Supreme Court.
"This has been a long road - and no doubt the policy will continue to have its critics - but it is a bold and necessary move to improve public health."
The SWA had brought a legal challenge to the legislation after it was passed, taking the case to the highest court in Scotland and the European Court of Justice, before it ended up at the UK's highest court.
During a hearing in July, the judges heard argument from the organisation that minimum unit pricing (MUP) is "disproportionate" and illegal under European law.
The SWA said there were better ways to achieve the Scottish Government's proposed 50p per unit minimum pricing plan.
But the Supreme Court unanimously ruled there was no breach of European Union law and that minimum pricing "is a proportionate means of achieving a legitimate aim".
Afterwards SWA chief executive Karen Betts said: "We accept the Supreme Court's ruling on minimum unit pricing (MUP) of alcohol in Scotland."
Scottish Health Secretary Shona Robison welcomed the decision saying: "This is a historic and far-reaching judgment and a landmark moment in our ambition to turn around Scotland's troubled relationship with alcohol.
"In a ruling of global significance, the UK Supreme Court has unanimously backed our pioneering and life-saving alcohol pricing policy.
"This has been a long journey and in the five years since the Act was passed, alcohol-related deaths in Scotland have increased.
"With alcohol available for sale at just 18 pence a unit, that death toll remains unacceptably high.
"Given the clear and proven link between consumption and harm, minimum pricing is the most effective and efficient way to tackle the cheap, high strength alcohol that causes so much damage to so many families."
She said the Scottish Government would now proceed with plans to bring in minimum unit pricing "as quickly as possible", with the Health Secretary adding she would make a statement to Holyrood setting out the next steps, including a time table for implementation.