Britain's biggest brewer, Scottish & Newcastle, is to close its Edinburgh plant, with the loss of 170 jobs.
Beer has been brewed at the Fountainbridge site since 1856
Staff at S&N's historic Fountain Brewery were told the brewery would close by the end of the year.
The firm, which produces Kronenbourg and Foster's beers in the UK, said it was buying a smaller production operation from Caledonian Brewery.
Unions reacted with anger to news of the closure and said they would fight any compulsory redundancies.
S&N blamed high fixed operating costs, low capacity utilisation and the city centre location of the factory for its decision to close Fountain.
Beer has been brewed on the site since 1856, while the current brewery has been in operation for more than 30 years.
S&N said the changes would cost around £25m ($47.1m) and result in annual savings of about £10m.
John Dunsmore, chairman of S&N's UK subsidiary Scottish Courage, said the company had invested in a range of options in an attempt to keep the Fountainbridge site open.
"Unfortunately, none of these options proved viable and it is with regret that we announce our intention to close the brewery at the end of this year," he said.
The Transport and General Workers' Union described the move as "a kick in the teeth" for workers.
Senior regional organiser Raymond Wilson said: "The closure of this site is an absolute outrage and is nothing more than sheer corporate greed."
One worker said: "Why take all the production out of Scotland? There's no need to do this.
"We are a Scottish company, or we were a Scottish company and we no longer exist - gone for good."
And the Campaign for Real Ale (Camra) criticised the plan "ending 255 years of brewing tradition in Scotland".
The consumer group voiced its concerns over the future of real ale brands such as McEwans 80/-, which will now be brewed at Caledonian Brewery.
John Holland, director of Camra, said: "This is a complicated deal and it's difficult to see through all the likely implications for consumer choice and the beer market generally.
"But we are certainly concerned for the future of 80/-, the one remaining McEwans real ale."
Meanwhile, Scottish National Party leader John Swinney said Scotland was "losing jobs hand over fist".
He said: "In the last 12 months we have seen our fishing and manufacturing industries taking a beating and we cannot allow our production and customer service industries go the same way."
He has demanded that the Scottish Executive start taking action to secure Scottish jobs.
S&N said some new jobs would be created through the
acquisition of the Caledonian Brewery, which will become the new home for the company's McEwan's ales.