A Livonia, Avon & Lakeville locomotive operated by engineer Tim Carney and conductor Greg Peffers waits on the tracks, in Lakeville, N.Y.

AVON, N.Y. - After an hour of shunting railcars aside, a 1964-vintage locomotive nudges six hopper-loads of flour down an embankment into a pasta factory here.

It's a routine delivery - 540 tons of semolina flour milled in St. Louis from durum wheat grown in North Dakota.

The Livonia, Avon & Lakeville Railroad Corp., a scrappy private firm with 30 employees and $4.5 million in annual sales, owns just 27 miles of track in a pocket of rural western New York. But it offers bulk freight shippers such as Barilla Group, of Parma, Italy, customized access to America's 140,000-mile rail network.

Without that rail ribbon, Barilla, the world's biggest pasta-maker, would not have contemplated putting a $100 million Northeast hub in this region in 2007.

"It was a must for us," said Kirk Trofholz, president of Barilla's U.S. subsidiary.

Spawned by a grassroots "Save the Railroad" campaign in 1964, the line is a vital ingredient in keeping a trio of small towns - Livonia, Avon and Lakeville - humming in farm country about 20 miles south of Rochester.

With big customers such as Kraft Foods Inc., Archer Daniels Midland Co., Cargill Inc., and Perdue Inc. churning out Cool Whip, corn sweeteners, cereal grains, and chicken feed, the little railroad helped hatch a "food corridor" that has once again ducked hard times hitting vast sectors of the economy - not least, the bellwether rail industry.

As big carriers abandoned old branch lines considered too short or remote to be profitable, micro-enterprises conjuring a bygone era filled the vacuum, bearing quirky or parochial names such as the Wiregrass Central Railroad Co., of Enterprise, Ala., and the Middletown & Hummelstown Railroad Co., of Middletown, Pa.

The Middletown & Hummelstown was completed in 1890 and was part of the Reading system until 1976.

Since federal deregulation of the industry in 1980, so-called short line railroads have surged in number from 200 to roughly 520. Overshadowed by behemoths such as Union Pacific Corp., each has annual freight revenue below $28 million a year. Two-thirds operate along fewer than 50 miles of track, and only 50 extend beyond 250 miles.

But they employ nearly 20,000 people, own 30 percent of the track they use, and handle a quarter of all freight in the United States, although often just for the first and last few miles of a transcontinental journey.

They offer businesses big and small - foundries, grain elevators, power plants, mines - high-volume advantages that trucking cannot match. A railcar can carry up to 125 tons, triple the capacity of a truck.

Overall rail volumes have slumped 15 percent to 20 percent this year, the steepest drops on lines hauling metals, lumber, and other raw materials and industrial products for manufacturing and construction.

Spread across every state but Nevada, few short lines have folded, but employees' hours have been chopped, said Adam Nordstrom, a lobbyist with the American Short Line and Regional Railroad Association in Washington. "We've been hit very hard. If our customers aren't moving goods, they're in trouble, too."

One bright spot is food.

"That's been fortunate for us because obviously, even in an economic downturn, it has to get pretty bad to stop eating," said LA&L chief executive officer Gene Blabey.

Blabey, 70, is a major stakeholder in the LA&L. He also has a stake in the Western New York & Pennsylvania Railroad L.L.C., which is based in Falconer, N.Y., and has 300 miles of track.

"Were it not for these boutiques, often locally owned, rural and small-city America would have lost its railroad infrastructure," he said. "The trend in every aspect of business is bigger is better. Yet rail, one of the first major industrial enterprises in the world, has, since the 1980s, gone to smaller is better."