The head of the National Farmers Union Scotland has said some sectors of the dairy industry avoided "oblivion" thanks to price-fixing by supermarkets.
Some supermarkets have admitted fixing milk prices
However, NFUS President Jim McLaren said that most farms had gained next to nothing from the practice.
Sainsbury's and Asda have admitted fixing prices after an Office of Fair Trading (OFT) inquiry.
The supermarkets, along with a number of other dairy firms, have agreed to pay fines totalling at least £116m.
Mr McLaren said it was important to understand the situation the industry faced five years ago - the period to which the inquiry relates.
"This has been a long-running investigation which has been hanging over the industry for some time," he said.
"It was a very difficult situation back in 2002 and many farmers were going out of business because they were receiving prices that were simply not sustainable."
He said that retail market prices had risen since then and were starting to rise at farm gate level.
"Our complaint at the time was that much of the rise in 2002 did not ever find its way back to the farmer," said Mr McLaren.
The NFU said the situation for the industry in 2002 was difficult
He added that he could understand that customers would be concerned by the situation.
"Certainly if price-fixing was going on and nobody was benefiting from it other than the retailer and perhaps the processor then I think they have got cause to be somewhat aggrieved," he said.
"But the reality was farmers were going out of business and the opportunity for UK consumers and Scottish consumers to source fresh, local Scottish milk in the future was really under threat.
"Although a limited amount of that money made its way back there is no doubt that the initiative - as it now appears to have been - has certainly saved some sectors of the industry from complete oblivion."
The inquiry relates to price-setting in 2002 and 2003.
Sainsbury's and Asda have admitted price-fixing of milk and cheese, as has Safeway - before it was bought by Morrisons.
Safeway also admitted colluding on the price of butter.
Dairy processors Dairy Crest, the Cheese Company and Wiseman have also reached agreement with the OFT.
Another dairy firm, Arla, has been given immunity from fines if it co-operates with the investigation.
However, Tesco, Morrisons and Lactalis McLelland are challenging the OFT findings.
Wiseman Dairies - which has centres in Aberdeen, East Kilbride and Glasgow - is facing a £6m bill.
It has said that all additional revenues paid to the firm had been passed on to suppliers.
"Whilst we are disappointed at the outcome of the investigation, this agreement removes a long shadow hanging over the company," said chairman Alan Wiseman.