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.
In the case the Supreme Court had to decide whether the Alcohol (Minimum Pricing) (Scotland) Act 2012 was incompatible with European Union law.
Scottish ministers have prepared a draft order specifying a minimum price per unit of 50p, but neither the 2012 Act nor the order have been brought into force because of the legal proceedings.
A small number of countries, including Canada and Russia, and some states in the US, have a form of minimum pricing, according to the Institute for Alcohol Studies.
But Scotland will be the first nation to introduce minimum unit pricing.
It comes after figures showed there were 1,265 alcohol related deaths in Scotland in 2016 - a rise of 10% on the previous year.
Alcohol misuse results in about 670 hospital admissions and 24 deaths a week - with the Scottish Government saying death rates are almost 1.5 times higher now than they were in the early 1980s.
And it estimated that alcohol misuse costs Scotland some £3.6 billion a year - the equivalent of £900 for every adult.
Sales figures show that in 2016 17% more alcohol was sold per person in Scotland than in England and Wales.
Research by Sheffield University has suggested a 50p minimum unit price could result in 121 fewer deaths a year after 20 years, while hospital admissions could fall by more than 2,000 a year by then.
Ms Betts said the whisky industry would continue to work with the Government and others to "promote responsible drinking and to tackle alcohol-related harm".
She added: "We will now look to the Scottish and UK Governments to support the industry against the negative effects of trade barriers being raised in overseas markets that discriminate against Scotch whisky as a consequence of minimum pricing, and to argue for fair competition on our behalf.
"This is vital in order that the jobs and investment the industry provides in Scotland are not damaged. At home, we hope to see an objective assessment of the impact of MUP."
A UK Government spokeswoman said: "We have noted the ruling of the UK Supreme Court in favour of the Scottish Government.
"Minimum unit pricing will continue to remain under review pending the impact of its implementation in Scotland.
"The Government continues to consider a range of measures available to control excessive alcohol consumption through taxation and pricing.
"We are also working to address the harms caused by alcohol, through our Modern Crime Prevention Strategy, published in 2016.
"The strategy contains new measures to prevent alcohol-related crime by improving local intelligence and equipping the police and local authorities with the right powers."