Behind the pale yellow walls of a former Benedictine monastery on a wooded hill near Munich, the master brewers of Weihenstephan are still perfecting their art after nearly 1,000 years of making beer.
Since Saint Corbinian and his monks first created a golden, nourishing beverage from local hops, the world's oldest brewery has withstood fires, plagues, plundering foreign armies and secularization.
Weihenstephan's cosy brew house, dominated by four steel vats of foamy brown liquid and infused with the sweet smell of malt, embodies a proud beer culture that culminates every year in Munich's Oktoberfest folk festival - a 16-day homage to beer.
Yet for many German brewers, the good times are over.
A slump in consumption of more than a third in the last 25 years has hit Germany, Europe's biggest beer producer, triggering intense competition and price discounting.
With young Germans turning to spirits and non-alcoholic fruit drinks, beer sales fell 2 percent last year alone.
Traditional family breweries, also under pressure from double-digit rises in energy, glass and malt costs, are struggling, some dying.
"We're in an extremely tough market," Weihenstephan boss Josef Schraedler told Reuters. "You can't grow here unless you lower prices or .. develop a cult brand and charge a premium."
Weihenstephan is shielded by its rich history and ties to a prestigious brewing academy next door that helps innovation, but Schraedler says the deteriorating market has become a threat to small-to-mid sized brewers in towns across Germany.
In a sign of how dire the market is, five domestic brewers were fined this year for price fixing. In a bid to lift weak exports, the sector is trying to get the famous purity law, or Reinheitsgebot, put on UNESCO's world heritage list. The law prescribes beer's four ingredients: malt, hops, yeast and water.
Germany's DBB beer association has sounded the alarm.
"Beer risks becoming an outdated product," it warned earlier this year. Nowhere in the world is beer as expensive to make or cheap to buy as in Germany. Nowhere does brewing make so little money, the DBB says.
In a country where songs praising the golden brew are part of national culture, that hurts.
Germans still drink more beer per head than anyone else in the world, bar the neighboring Austrians and Czechs.
It is not uncommon, especially in southern Germany, to see older men savoring a large beer at breakfast. Until recently it was sold on factory floors. It was easy for breweries to grow complacent.
Although craft beer is a growth market for small start-ups, traditional family breweries have been hit hard.
The number of mid-sized breweries, producing 5,000 to 500,000 hectoliters (roughly equivalent to a U.S. barrel), has fallen significantly in the last 20 years, says the DBB. Among those to shut in the last few years are Torgauer Brauhaus, Schlossbrauerei Schwerin and Hofbrauhaus Bad Arolsen.
Its fragmentation makes it a difficult market to dominate, a deterrent for global majors. Of Germany's almost 1,350 breweries, more than 900 produce just 5,000 hl a year or less.
Only two international giants have a significant presence here: ABInBev, which owns Beck's - Germany's top export brand - and Carlsberg, which owns Holsten.
Germany's Radeberger Group, which owns Jever, Berliner Pilsner and the Radeberger brand brewed near Dresden that was considered the best pilsner in communist East Germany, sells the most beer in Germany today.
ABInBev is next, followed by Bitburger, whose domestic sales are falling along with other lager producers like Warsteiner, according to data from online trade publication Brauwelt.
Two decades ago, German brewers were thriving amid booming demand. But they missed trends, such as developing flavored beers, and did not invest heavily in emerging markets, says Trevor Stirling, beverages analyst at Bernstein.
"Day-to-day survival is so brutal that lifting your eyes and looking at the rest of the world is hard. It's not a trait that comes easily to German brewers," he said.
Global players have struggled due to the complexity of the domestic market and have been put off.
ABInBev has no plans to invest further in the German beer market. Sales of some of its German brands, including Loewenbraeu and Spaten - big Bavarian labels linked to Munich's Oktoberfest - are stagnating.
Beer's allure is fading with the young. Bottled water overtook beer as the most popular cold drink in 2002.
"The image of beer in Germany has not been nurtured. Here beer is something you take for granted," said Schraedler of Weihenstephan.
An attempt by brewers to win world heritage status for the Purity Law, issued at Weihenstephan's doorstep in 1516 by Duke Wilhelm IV of Bavaria, may help exports but is no panacea.
"Achieving heritage status isn't going to make an 18-year old German drink a Veltins beer over a Bacardi," said Stirling.
Niches and exports
In a bid to move upmarket and charge more, some breweries are trying to tap into growing demand for specialty beer.
Stoertebeker, a producer in the Baltic port of Stralsund named after a pirate who legend says walked past 11 men after being beheaded in 1401, changed course eight years ago and relaunched in 2011.
Marketing chief Karsten Triebe told Reuters that the company is now focused on higher-priced beers that "look, smell and taste different" and go well with food.
"We realized we wouldn't survive in the long run without a new concept," he said.
Helped by brands like Atlantik Ale with a citrus aroma, the strategy seems to be working. Since the shift, sales are up 25 percent compared to a 12.5 percent fall for German brewers.
Future success depends on the specialty beer niche which could grow to some 10 percent of overall demand from 1-2 percent now, says Triebe who wants others to help expand the market.
Given weakness at home, exports are another option. But many brewers missed that boat when times were good and there was no incentive to look abroad.
"The complacency ended 10 or 15 years ago when breweries realized the market was deteriorating. Now companies are turning to exports but it is too late," said Schraedler.
Weihenstephan near Munich is an exception. Over the past 14 years it has expanded into 43 export markets, up from six, allowing it to avoid the fate of struggling rivals. Growth last year was down to exports, which now comprise 60 percent of sales.
The company, owned by the state of Bavaria, sees most growth in the United States, especially in New York where its traditional wheat beer is viewed almost as a specialty brew. Other big foreign markets include Italy and Austria.
Innovation has been another key to success since 1040, when Abbot Arnold obtained a license to brew and sell beer.
Weihenstephan is home to a world center for brewing technology. Researchers at the institute, part of Munich's Technical University, work on finding high-quality hops and yeast. They have even improved the taste of alcohol-free beer by extracting the alcohol at the latest possible stage.
"Who knows, but I hope we'll still be brewing in 1,000 years," said Schraedler.