FORT COLLINS — Before the bartender pulls the tap, before the brewer swirls the kettle with hops, before the maltster kilns the grain and before the barley sprouts from the dirt, a pint of beer increasingly owes its start to a laboratory in northern Colorado.

Inside greenhouses, under microscopes and out in the fields, scientists are studying how to make better grain seeds — and ultimately, better beer.

“Brewing a beer is a biological process,” says Adam Heuberger, an assistant professor at Colorado State University’s horticulture and crop science program who specializes in grain research. “There’s biological transition from barley to malt and a transition from malt to be used by yeast in beer. So the malt itself has to have certain chemical compounds to be used effectively in brewing systems.”

Behind Anheuser-Busch’s brewery in Fort Collins, a 24-member team at the barley research center is breeding new grain varieties to offer higher yields at harvest, use less water to grow and become more disease- and pest-resistant.

“We know the specifics of both parents, and we are combining them to try to get the best combination,” says Gary Hanning, the director of global barley research for a subsidiary of A-B InBev, as he surveys the waist-high stalks in a greenhouse.

In any given year, Hanning’s team — most of whom were trained nearby at Colorado State — will breed about 1,500 different combinations looking for just one or two that will move to the next phase of testing. Some seeds may get tested in the adjacent 110-acre research field near the brewery, while others are being bred to grow in different conditions across the globe.

From lab to bottle, the process takes at least 14 years. “Every year our varieties have to be better — better in yield, better in adaptability and better in malt quality,” Hanning says.

Much attention in Colorado is focused on what’s poured into the glass, but the state’s renowned beer scene is much larger, as a cluster of research facilities in Fort Collins demonstrates.

A-B InBev, the makers of Budweiser, announced this month it would invest $29 million in 2017 into the Fort Collins brewery, including a $1.4 million upgrade to the barley research center that concluded in April. The company touts 16 research centers worldwide, and Fort Collins is the hub for the United States.

The beer giant doesn’t grow any grain for its beers in Colorado, but others do.

MillerCoors, the U.S. business unit of Molson Coors, which has headquarters in Denver, sources 25 percent of the grain for its beers from Colorado — totaling 180 different farmers and 47,000 acres near Longmont in the north and Monte Vista in the south.

The company conducts its barley research elsewhere but runs a 1,100-acre test farm in Center, where it is studying how to improve its proprietary Moravian barley for arid Colorado seasons, among other maladies.

“Farmers are innately adept at continuous improvement because it’s how they survive,” says Wade Malchow, Molson Coors’ barley program manager. “We are a part of helping them do that.”

From grain to glass in Fort Collins

In Fort Collins, 5 miles down the interstate from Anheuser-Busch, sits Limagrain Cereal Seeds. Part of a global farmer-owned company, the Colorado office helps research the best grains for the craft breweries.

The smaller independent brewers are looking for different grain than their bigger competitors and increasingly they want to work with local farmers and local malsters.

Horse and Dragon Brewing in Fort Collins features beers with grain malted at Troubadour, a small maltster within walking distance that buys its grain from five farms just miles away.

“Real people and real places — and telling that story is the value add” for craft beer, says Chris Schooley at Troubadour Maltings, which also supplies Denver breweries such as Cerebral and Trve. “If you are paying for a $6 pint and the brewer says (the grain) is grown down the road, that’s makes the difference.”

The bicycle tours that stream through Fort Collins, the state’s craft beer hub, are increasingly visiting the malting house and even the farms where the grain is grown.

“When you look at actually what happens in a barley seed and how amazing that is, that’s a cool story,” says Zach Gaines, the technical and marketing manager at Limagrain in Fort Collins, who spent 10 years at Anheuser-Busch, including its barley research center. “Inside of that seed is everything you need to make beer. … It’s almost like a one-stop shop.”

The craft-beer governor gives a nod to big beer

In a recent visit to northern Colorado, Gov. John Hickenlooper, a former brewpub owner, celebrated the investment in research that helps make the state’s beer industry thrive.

He opened Denver’s Wynkoop Brewing in 1988 — the year Anheuser-Busch opened in Fort Collins. Back then, he said, “if you ever told me there would be over 350 breweries someday in Colorado, I would have laughed in your face.”

“All the changes that have happened since then have led to the creation of a gigantic ecosystem that has all these little breweries, but also has large breweries playing an active and critical role,” he adds.

His remarks at the Anheuser-Busch facility didn’t go unnoticed as competition in the beer market intensifies between mega brewers and the craft industry — neither did his tipping back of a red aluminum can of Budweiser.

“I think it’s important for small brewers to realize that a lot of the research that really does help get better qualities of malted barley or better qualities of hops … comes from the large breweries,” he says.

As for the bitter feelings as Anheuser-Busch wades into the craft market — including the purchase of Breckenridge Brewery — Hickenlooper brushed aside the concern.

“There’s always going to be a natural antagonism between the big guys and the little guys, it’s just part of human nature,” he said. “But my job as governor is to kind of smooth over that.”

Correction: An earlier version of this story misstated which company sources 25 percent of the grain for its beers from Colorado. It is MillerCoors, the U.S. business unit of Molson Coors.