It's not an uncommon problem in Alaska groceries: A whole shelf meant for bananas was almost completely empty one day last week at the Fred Meyer store in Midtown Anchorage.

Keeping fresh produce that's grown thousands of miles away in stock here is a delicate system that grocers have been perfecting for years. Still, one 24-hour delay — recently, a cargo ship needing a repair and stuck in Tacoma, Washington — can send swift ripples through the food supply chain.

"There's definitely a lot of challenges to bringing produce up," said Franz Sutherland, Alaska district manager for Fred Meyer. "Literally every week there's something different. … It's definitely a balancing act."

It's not just getting the produce here, but making sure it's in peak condition. Getting items like avocados, greens and mangoes to the North is a puzzle suppliers, shippers and grocers are constantly piecing together year-round, but colder months are tougher. They are up against the distance, extreme weather and all the perils that can come with transit routes to Alaska in winter.

Making it all work requires "an astronomical amount of people," Sutherland said.

At grocery chain Carrs Safeway's chilly distribution center on C Street in Anchorage on Thursday, workers maneuvered swiftly on forklifts, preparing pallets of greens, tomatoes and dairy products to go out to stores. Boxes full of peppers, mushrooms, pears and berries were labeled with their origins — Washington state, Chile, and so on, from around the globe.

Much of Alaska's food comes up by container ship over the water. Some also arrives via trucks that take the Alaska Highway, or by air freight.

"It's cheaper to barge or fly it in than it is to grow it here," said Stephen Brown, a Palmer-based district agriculture agent with the University of Alaska Fairbanks. "The problem with that is that creates a very fragile food supply that's very easy to be disrupted."

On top of Alaska's distance from the Lower 48 and inclement weather, some Last Frontier communities are just tough to reach.

Robin Barber, director of distribution at Carrs Safeway for Alaska, pointed to a December avalanche that shut down the highway to Valdez as one example.

"The ferry's not going in the wintertime, but … when you've got a 40,000-pound order sitting on the other side of the avalanche, for a day or two people stay calm, and beyond that they start to panic," she said.

A lot of places in the Lower 48 have several alternate routes to turn to if one path goes awry. Not so for much of Alaska.

Carrs Safeway ships goods up on Matson vessels twice a week, arriving on Sundays and Tuesdays, and other items come up on the road. Parameters for shipments can be highly specific. Some fruits can't even be next to each other: Bananas — which will ripen up other produce and need to be kept separate from avocados and tomatoes — have their own special ripening rooms at the warehouse, where they're gassed with ethylene to come into their prime flavor right on time.

Jodi Gongora, manager for the distribution center, said there have been more ship delays this year than in the past five years, due to rough weather in the Gulf of Alaska.

Alaska is also typically more expensive for companies. That's the case for distributor Charlie's Produce, which also has locations in Washington state, Idaho, Oregon and California, said Anchorage general manager Oliver Evans.

"It's the wait time, it's the additional time in transit — is pretty challenging," he said.

Consumers in Alaska are increasingly hungry for organic produce, and crave Alaska-grown food, said Sutherland, with Fred Meyer. The company orders as much as it can from local growers — potatoes, carrots, leafy greens in the summer, for instance — but Alaska-grown items only go so far, he said.

Alaska also isn't as profitable as other markets for Salinas, California-based salad greens company Organic Girl, said northwest regional business manager Don Bergen.

"In Hawaii, they pay $6.99 or $7.99, something like that" for the product, he said, "where in Alaska, they like to pay basically the same price or close to the same price that the product is on the shelf in the Lower 48."

Over the years, improved efficiency in shipping has made it possible to turn Alaskans' demands for food from all corners of the world a reality.

"There was a time when we didn't expect to have all the produce there is, 365 days a year," said Brown, with UAF. "As a society now, we expect everything all the time."

A Tote Maritime Alaska ship was the one that was late getting to Anchorage last week, due to a weld that required a repair by divers in Tacoma.

"When there are disruptions to that supply chain, things can become difficult rather quickly. That's when you can start to see shelves looking a little bit thinner. … Nobody wants to buy 2-week-old strawberries that are half-rotten," said Grace Greene, vice president at Tote Maritime Alaska. "Having a tight supply chain is really critical."

About 15 years ago, Tote introduced new ships for its Alaska market with more components — two propeller systems instead of one, four engines instead of two — to keep the vessels sailing even when something needs repair.

Still, delays happen. And it can take a couple of weeks for things to get back on schedule again, Greene said.

Shipping company Matson has three ships that serve the 49th state. Director of Alaska Railbelt logistics Eddie Walton said the company has invested heavily in new refrigerated containers to move food up north in the precise conditions it requires. He added that all the transportation coming northbound through the Gulf of Alaska has had issues this year.

You can see the fallout from delays when you shop. One afternoon last week at Fred Meyer, one of the apple shelves sat empty, there were just two lonesome packages of kiwis, and there were holes where vanilla soy milk and eggs should have been.

Sutherland said the chain has ways to adapt if even one ship is taken out of the Alaska rotation. The company basically doubles the number of trucks it has coming up on the highway, and prepares to have 12 more hours worth of stock on-hand in the store.

But driving goods up has its own perils in the winter. Trucks can roll over on the ice. If the driver doesn't monitor the trailer's temperature, whole orders can end up frozen and the company eats the money. Recently, one driver had an issue with fuel gelling up from the cold, and another driver had to make a 12-hour journey from Anchorage to help him, Sutherland said.

"We try not to have all our eggs in one basket," he said. "When there's only one ship a week — salads aren't going to last you seven days on the wall."

At the Costco in South Anchorage, general manager Bob Ripley said the company has produce coming up over the highway every week in trucks with two people, so they can switch off driving and get here faster. For years, Costco in Alaska experimented with flying up products like ultra-sensitive berries, to figure out how to have them year-round.

For a while at Fred Meyer, avocados were coming in too soft, so the chain had to work with its buyer to make sure they hit the warehouse earlier.

"The consumer really wants fresh," Sutherland said. "When you have to put produce on a ship for five days or drive it over the road, it takes a beating. … You're losing so many days just to get it here."

Getting produce to rural parts of the state in prime condition is even harder. This year, Barber said, there have been a lot of flight delays getting out of Anchorage to Nome and elsewhere, leaving freight stuck at the airport waiting to take off and losing shelf-life every hour.

"You've got so many modes of transportation to deal with up here," she said. "Not even every runway's the same. You can fly into Valdez with a small plane, but can't fly into Seward. … We just start going down the list. If this happens, here's what we're going to try, if that doesn't happen, we're going to try this. But we never say, 'OK, we're not gonna ship the freight.' "