NEW YORK — To see how a small business can transform a neighborhood, just follow the barrels.

About 30 years ago, beer lovers wanting to create their own drinks started taking over abandoned old buildings in rundown city districts, refitted them with tanks, kettles and casks, and started churning out beer. The byproduct was a boom in craft beer drinkers: Barrels shipped have more than doubled in the past decade, according to trade publication Beer Marketer's Insights. Craft beer now makes up nearly 7 percent of the slow-growing U.S. beer market.

But beer drinkers weren't the only beneficiaries. The arrival of a craft brewery was also often one of the first signs that a neighborhood was changing. From New England to the West Coast, new businesses bubbled up around breweries, drawing young people and creating a vibrant community where families could plant roots and small businesses could thrive.

It happened in Cleveland. Once an industrial powerhouse, the Rust Belt city has been losing residents since the 1950s. Manufacturing jobs disappeared. The city nearly went bankrupt in 1978.

Marred by abandoned buildings and boarded-up stores after several hard decades, the downtown Ohio City neighborhood, just west of the Cuyahoga River, which divides Cleveland, was "perceived as dangerous and blighted" into the 1980s, says Eric Wobser. He works for Ohio City Inc., a nonprofit that promotes residential and commercial development while trying to preserve the neighborhood's older buildings.

Enter Great Lakes Brewing, which opened in 1988. Over the years, it's built a brewery and a brewpub from structures that once housed a feed store, a saloon and a livery stable.

"We resurrected all of them," says Pat Conway, who founded Great Lakes with his brother, Daniel. "We've beautified the neighborhood, provided a stunning restoration."

Other breweries and businesses — a pasta maker, a bike shop, a tortilla factory, as well as restaurants and bars — followed. Newcomers are flocking to the neighborhood, even though Cleveland's overall population is still declining. The city repaved the quiet street next to the brewery, Market Ave., with cobblestones, and poured millions into renovating the West Side Market, whose origins date back to the 19th century. Today, more than 100 vendors sell produce, meat, cheese and other foods there.

What's going on in Cleveland is happening across the country. Trendy small businesses like breweries and younger residents have been returning to downtown neighborhoods in many cities across the U.S. The biggest cities are growing faster than the suburbs around them, according to Census data.

Another benefit of the brewery boom: Manufacturers like brewers typically pay workers more than service businesses like restaurants or shops do. That's good for local economies.

But for some, the bubbles are bursting. In Brooklyn, N.Y., breweries are feeling the heat from rising real estate costs.

When Brooklyn Brewery opened in the Williamsburg section of the borough in 1996, its neighbors were mostly deserted warehouses and factories. Today, Brooklyn Brewery is surrounded by modern apartment buildings, trendy bars, shops and restaurants. There's still some graffiti, but that hasn't deterred the influx of new residents willing to spend a lot of money to live there. In the past decade, home values in the Brewery's neighborhood have more than doubled — up 145 percent, according to real estate appraiser Miller Samuel.

Rising prices might force Brooklyn Brewery to exit the trendy scene it jump-started. It has two buildings in Williamsburg, the brewery and a building across the street where it stores and ages its beer. Leases are up in 2025, and Brooklyn Brewery's co-founder and president, Steve Hindy, is already worried that the company will get kicked out of its warehouse. Once an iron foundry, the building, built in 1896, has been bought by developers who Hindy says won't renew the lease. He suspects that they want to convert the space into apartments.

The landlord, Solomon Jacobs, says he doesn't yet know what's going to happen with the lease.

But Hindy is already scouting other, cheaper neighborhoods in Brooklyn.

"We sowed the seeds of our own demise here," Hindy says.

Gentrification is pressuring at least one other nearby brewer. Kelly Taylor, who owns Kelso, is looking for new space in Brooklyn or the Bronx because he thinks his landlord won't renew the lease in 2017. In Kelso's neighborhood, the Clinton Hill section of Brooklyn, home prices have almost doubled over the past 10 years, according to Miller Samuel data.

"He'll tear down and build something more lucrative," Taylor says speculatively of his landlord.

However, the building's manager, Fred Sanders, says the lease was just renewed last year for five more years, and he hasn't had any conversations with Kelso about the future.

Even if the brewery owners don't have confirmation that they'll be forced to move, history shows they have reason to be concerned. Winifred Curran, a geography professor at DePaul University in Chicago, studies how gentrification changes cities. She wrote her graduate-school dissertation on how gentrification in Brooklyn's Williamsburg neighborhood affected small manufacturers. Small businesses struggled to stay put while developers converted factories and warehouses into lucrative lofts and swarms of wealthy new residents drove up prices, she says. She warns that the appeal of revitalized neighborhoods can decimate small businesses, both old and new.

"You can try to use the establishment of manufacturing businesses to be the wedge that allows gentrification to happen, but then you need to protect those businesses," Curran says. Otherwise "the market creates this demand for industrial space and then kills the goose that laid the golden egg."

Outside of New York, costs are lower, and many brewery owners in other cities say they haven't felt similar pressures from developers. But New York flashes a warning sign for what can happen when neighborhoods become popular.

One brewery, in Boston, is relatively protected. Harpoon Brewery opened on the South Boston waterfront in 1986, when it was surrounded by auto body shops and little else. Now the brewery draws more than 85,000 people a year from tours and tastings. These days, the city is focused on redeveloping the area. New apartment and office buildings, restaurants and a convention center sit nearby. Harpoon recently negotiated a 50-year lease with the city. The rent will rise over time, but generally, long leases provide protection from spikes that can happen when an area becomes so popular that property values skyrocket.

On the country's other coast, the tech boom has made one brewpub's growth plans more complicated. The 21st Amendment brewery, in San Francisco, is two blocks from the Giants' baseball stadium, which opened in 2000 and, along with the bustling technology sector, transformed the city's SoMa neighborhood from abandoned warehouses to hot spot. Now the company wants to build an 80,000-square-foot brewery — but that's not possible in SoMa.

"The manufacturing element of the business has been priced out," says 21st Amendment's founder, Nico Freccia. The company has opened offices in the East Bay, and he's scouting space there for the brewery, hoping to "help anchor the revitalization" of an Oakland neighborhood.

Similar dreams are fueling a new beer company in New York. Bronx Brewery is setting up shop in the Mott Haven section, next to a lumberyard, a manufacturer and the plant that prints the New York Post.

"We really want to be in the Bronx, be a part of a south Bronx community that's growing like crazy," says Chris Gallant, co-founder of the brewery, which will have a space for visitors. "We hope to get as many people there as possible — it'll definitely serve as marketing," he says.

About 29 percent of Bronx residents live in poverty, compared with 15 percent for all of New York state, according to Census data.

"I think that entire area is going to increase in value," Gallant says. "That's great for the south Bronx. But it could put us in a tough spot 10 years from now."