– The whistle from across the border gave warning, as it does 22 times a day, that anyone with places to go or people to meet would have to wait.

Thundering slowly across the bridge from Fort Frances, Ontario, a trio of red train engines pulled 1.6 miles of shipping containers, chemicals and lumber for Canadian National Railway. The cars rolled past Grandma's Pantry and Tara's Wharf, Woody's Fairly Reliable Guide Service and the McHarg family's kitchen, then around a bend south toward Duluth and then Chicago.

A surge in shipping from Asia to the American Midwest has doubled the number of inbound rail cars at Ranier in the past five years — and transformed the life of the town. The trains bring noise, create long delays on the biggest street in town and force boaters to wait for a lift bridge to clear. The by-product for town leaders and residents alike: long, frustrating negotiations with the railroad.

"It's like Muhammad Ali punching a blind guy. We're out. You won," said Barry Woods, a fishing guide who goes by "Woody" and owns a struggling resort a block from the rail line. "I'm not against people making a buck, but I'd rather pay two more cents for a pingpong paddle than put up with this."

Across a state and region crisscrossed with rail arteries, small towns bear daily witness to the pulse of trade that passes them by, carried by railroads that enjoy a great deal of autonomy over when and how they move freight. Crops head to market in hopper cars, oil cars come east from North Dakota and Alberta and silica sand goes west.

As traffic increases, bottlenecks appear. In Ranier, a town of 150, regional shipments of oil and crops are compounded by the flow of consumer goods that arrive in the Midwest from Asia via western Canadian ports.

The city council and mayor believe the intensified rail traffic harms businesses, erodes Ranier's tourism and threatens the viability of their town. "Just about every council meeting, I've got to give an update on the railroad, because there's always some issue," Mayor Dennis Wagner said.

The city has complained about engineers who are overenthusiastic with the whistle at all hours. It has asked Canadian National to make crew changes south of town so trains can get through more quickly, requested that the railroad fix the crossing on Spruce Street and demanded that the company move a garbage dumpster that sometimes appears by the track right on the main drag of town.

Each of the town's supplications runs into a sprawling web of corporate and federal government bureaucracy that only reinforces the belief that their resistance is futile.

"You can't necessarily change the number of trains that go by, because they mean business, even though it interrupts our local commerce," said Tara Nelson, owner of Tara's Wharf, a bed-and-breakfast and ice cream shop facing north out into the lake. "The railroad is not that cooperative."

Canadian National points out that it talks regularly with officials in Koochiching County and has spent millions of dollars to increase efficiency at the border crossing in Ranier by adding track capacity and equipment to hasten customs inspections. Last year, the railroad made $110 million in capital investment on rail corridors in northern Minnesota.

"We disagree with the characterization that Ranier's issues are not heard, as we've worked extensively with local officials," said Patrick Waldron, a railroad spokesman.

From China to Ranier

Ranier is east of International Falls at the west end of Rainy Lake — an outdoor playground along the border that's three times larger than the combined surface area of Minneapolis and St. Paul and strewn with green islands. Where the Rainy River rushes out of the lake and forms the border going west to Lake of the Woods, trains cross on a one-track steel lift bridge, built in 1908.

That bridge is the crossing for a rail line on which inbound traffic rose from 28,000 containers a month at the end of 2010 to 56,000 containers a month at the end of 2014. The trains go to Chicago from Prince Rupert, a port on the British Columbian coast that mainly served to export timber until recent years, said Larry Gross, a freight transportation consultant.

Prince Rupert is closer to China by ship than the big U.S. ports on the West Coast, and feeds a historically underused Canadian National line across Canada's mountains and prairie. Canadian National helped the port at Prince Rupert develop its inbound cargo capacity, and traffic picked up.

"It's a very smoothly operating port, and that's important these days because that cannot be said of the U.S. West Coast ports," Gross said.

U.S. ports on the West Coast have suffered from congestion and a recent six-month labor standoff that diverted traffic to Canadian ports. A key BNSF line across the northern part of the United States became crowded with oil tanker cars and record crop harvests, and the sheer volume of trade keeps rising. The ships get bigger, the trains longer.

"The CN is able to offer a pretty good service in terms of running time and reliability," Gross said.

A new way of life

When a train arrives in Ranier, drivers turn off their cars and collect their thoughts while they wait.

Tara Nelson always takes a book with her, right now a love story set on Rainy Lake. If she gets caught on the other side of the tracks, by the post office, she turns down a side street to the Duluth Street Landing on the river, checks the currents and watches the pelicans.

Nelson, who opened her ice cream shop in 1996, also did what she could to take matters into her own hands. She bought a pair of wooden benches that fold into half-picnic tables and put one on the north side of the tracks and one to the south.

"At least people that were on foot could sit a moment and relax," she said.

Woods, Nelson's neighbor, grew up the youngest of 12 in the basement of what's now the post office, just feet from the tracks. He remembers when rail crews lived in Ranier and patronized local businesses.

Now, as the trains get longer, the number of rail jobs in Ranier has declined.

He puts off a chore when he hears the whistle, or starts one, to time his life with the rhythm of the trains. "You always keep one ear open," he said.

The city is in a running correspondence with Canadian National, U.S. Customs and Border Protection, the Coast Guard, Koochiching County and several politicians over problems with the rail, and has recently gotten two victories.

The latest news is the railroad will fix the rutted crossing on Spruce Street, the big north-south street in town, next month. Also, the bonding bill Gov. Mark Dayton signed in the special legislative session included $460,000 for Koochiching County to pay for a short road as an alternative route on the east side of town around the rail crossing that gets blocked.

A daunting bureaucracy

Every time a CN train crosses the border, it switches crews from a Canadian to American. This happens at the Customs office next to Spruce Street, forcing the train to stop completely, which means it takes longer to get going again and blocks the street for longer than it would if it could just roll straight through.

Typically the delay is 20 minutes, though it can be longer. And while drivers can go a few miles east of town to get around the train to get to or from International Falls, the city is always looking for ways to cut the time the train blocks the street.

Last summer, the city and Koochiching County asked Canadian National to make its crew changes south of town, which would allow trains to roll through at about 8 miles per hour. CN complied and started making crew changes at a rail yard south of town.

Then things got complicated. The crossing arms and bells weren't calibrated correctly. Sometimes they didn't drop before a train came, other times they dropped when no train was crossing. The street could be blocked for up to an hour without a train going through, the city said. Drivers, tired of waiting, started zigzagging through the crossing arms as bells rang around them.

The new situation was worse than before, the city said in January. When the council complained about the timing of the crossing arms and bells, the railroad just went back to making crew changes in town.

"Now we're back to square one," Wagner said.

Another example of the bureaucracy Ranier's up against is the lift bridge. Boats going from International Falls to the lake must pass under the 107-year-old structure. Because of the train traffic, the bridge is almost always down. When boaters want it raised, they must call the bridge operator, who contacts CN to make sure no trains are coming and only then can raise the bridge.

Sometimes there are delays getting in touch with the right people, Wagner said. In 2014, when water on the lake was high and many boats couldn't get through, the delays were exasperating.

Complaints about bridge delays must be made in a form titled "Ninth District DrawBridge Signals or Operations Delays Form." The form is then sent to a U.S. Coast Guard office in Cleveland.

"It should just be up, and then put it down when there's a train," Wagner said.

Jeff McHarg remembered the lake, the peace and the quiet of his childhood in Ranier, and talked his wife, Amy, into moving there from Los Angeles in 2012. They had plans to open a restaurant.

The growth of the rail traffic has been an unwelcome surprise. The McHargs live next to the tracks and they now view the disputes with the railroad as a lifelong battle. Lay off the horns, fix the crossing, just be a good neighbor, they say.

"It's the respect factor," Amy McHarg said. "Be respectful of the community and we'll respect you back."