Plans to give so-called "tied" pubs more choice over what they sell have secured cross-party backing at Holyrood.
Scottish Labour MSP Neil Bibby can now take forward his member's Bill after Labour, Lib Dem, Green and Tory MSPs signalled their support.
The legislation is aimed at helping pubs that have a "tied" arrangement with the large companies that own them, often known as "pubcos".
Tied pub tenants are required to buy some or all of their products from the pubco, which can restrict the choice of beer, cider, wine and spirits for drinkers, and can force pub tenants to sell more expensive drinks.
More relaxed rules were introduced in England and Wales from May 2016 and while there is a voluntary code in place in Scotland, critics say this does not go as far as the statutory arrangements south of the border.
Mr Bibby's Bill would create a statutory code to regulate the relationship between tied pub tenants and landlords as well as an independent adjudicator to enforce the code.
He said: "Getting to this stage is a real step forward towards getting a fairer deal for consumers and tied licensees in Scotland.
"My Bill would reset the relationship between tied licensees and their landlords, giving tied tenants in Scotland statutory protection, and it would make it easier to bring locally-brewed products into the tied pub sector.
"MSPs from across the Scottish Parliament have signed my proposal and I am now asking the Scottish Government to work with me to deliver a much-needed change in the law and a fairer deal for Scotland's tied pubs and the brewing industry."
The move is backed by organisations including the Scottish Licensed Trade Association, the Campaign for Real Ale, GMB Scotland, the Federation of Small Businesses and the Scottish Tourism Alliance.
A spokesman for the Scottish Licensed Trade Association said: "Pubs and bars in Scotland are currently facing unprecedented difficulties in the current economic climate and tenant licensees have the additional challenge of operating in this environment with, in the majority of cases, their Pubco landlords creating an unfair, uncompetitive marketplace for this sector which leads to a serious effect on the economy and the fragile health of the licensed trade industry.
"Tenant licensees are in a very vulnerable position and the sector needs legislation in Scotland to ensure that pub tenants get a fair deal and that they are no worse off than a free-of-tie licensee."