Overgrown with vegetation, the rusted rail tracks running between Reni in Ukraine’s southwest corner to the port of Galati in Romania had been consigned to Soviet-era history long ago. About a quarter of the 20-kilometer (12-mile) line is missing.

Yet like other relics of the old Eastern Bloc network, the route along the Danube River could eventually play a small part in an increasingly large and complex operation to secure vital food shipments.

European leaders are desperately trying to figure out how to get grain out of Ukraine, whose exports are normally bigger than the entire European Union’s. Russia, accused by the United Nations of waging war on global food security, last week said it would open maritime corridors to unblock ports such as Odesa on the Black Sea if sanctions against the country were lifted. Ukraine, though, said it was skeptical because of security concerns.

The labyrinthine challenge has politicians looking at everything from naval escorts to shifting whatever’s possible overland to the Baltic. Officials at ports, logistics companies and in the agriculture industry interviewed across the region say they are scouring maps for solutions like diverting road transport and reviving rail links such as the one connecting Galati.

The task is complicated by a dearth of truck drivers and the fact that the Soviets used a wider track gauge than the European standard. That has caused up to 30 days of delays at borders for existing routes, the EU has said, as cargo needs to be transferred onto compatible rolling stock and customs infrastructure gets overwhelmed.

Ports in Romania and Poland, meanwhile, are backed up with traffic or already at capacity while there are shortages of specialized personnel to handle the surge in demand. Even with Ukrainian exports at a fraction of what they were, trade officials warn that bottlenecks will get worse as the rest of Europe starts harvesting its wheat next month.

“The scale of the problem is enormous,” Taras Kachka, Ukraine’s deputy minister of economic development, told a conference this month. “In the last 15 years, we developed our infrastructure in a way that it cannot be simply replaced by another destination, another port.”

Ukraine is a major wheat, corn and barley supplier and tops global sunflower-oil sales. Future crops will undoubtedly shrink due to the war, but it still has 20 million tons of backlogged grain from last year.

Ukraine is expanding export capacity at its western border and simplifying trade arrangements with the EU. European Commission President Ursula von der Leyen said on May 24 the EU was working to get what’s stuck in Ukraine to global markets by opening “solidarity lanes” to European ports as well as financing different modes of transportation. Ukraine’s ambassador to Warsaw expects Poland to be the conduit for 80% of Ukrainian grain.

But people on the ground say that’s easier said than done when you look at the map, particularly the rail network.

In Slovakia, the main traffic operator transported 18,000 tons of corn from Ukraine last month across 12 trains, and private freight companies are also involved. The issue is that cargoes from Ukraine’s broad-gauge wagons need to be reloaded onto standard Europe size ones or the container section transferred onto different wheels.

Poland has a 400-kilometer broad-gauge railway linking Ukraine with its industrial southwest region of Silesia. It’s been used mainly for steel products, and in recent weeks to carry refugees. State railway network operator PLK SA has started investing in boosting capacity, reversing its earlier focus on connections as far as China via Belarus.

In April, Poland and Ukraine also agreed to create a joint cargo company and simplify border rules. But with routes to Poland’s Baltic ports already busy and a shortage of wagons, there are doubts over whether Poland can boost volumes of Ukrainian grain much above 2 million tons a month anytime soon. That compares with the 5 to 6 million tons typically dispatched monthly via its Black Sea ports, said Roman Slaston, director general of the Ukrainian Agribusiness Club industry group.

The railway line from Reni to Galati via Moldova would be a relatively small piece of the jigsaw, but it illustrates the enormity of the challenge.

TTS, a Romanian company that operates on the Danube and in the port of Constanta, has been working on clearing bushes and small trees to open up the route. “We are a logistics company and we’ve done many things in this life that defy geography,” Ion Stanciu, TTS’s deputy chief executive officer, said in an interview on May 20. “And now we’re starting from the same principle.”

Romania is keen to upgrade Galati to ease congestion at Constanta on the Black Sea. Galati is connected by the broad-gauge railway that’s compatible with the Ukrainian system and may facilitate the quicker rerouting of grains. The government wants to fast-track the construction of the missing section of 4.6 kilometers and the work will take three months, Prime Minister Nicolae Ciuca said last month.

Yet it’s still unclear who will do it, according to TTS, which has spent two months testing logistic options via railway or trucks. The route involves three countries and three different railway operators. Romania’s transport minister said he hopes to find a company to build the missing portion of track this week and may visit Galati with his Ukrainian counterpart.

“Ukraine was exporting 20 million tons of metals per year and even more grains only on water, so to think that it would be possible to completely replace these capacities is a dream,” said Petru Stefanut, TTS’s CEO. “What we’re all trying to do, is to help them as much as we can. But we can’t compare what they had and what they’ve lost.”

TTS has managed to transport about 200,000 tons of grains and metals from Ukraine in the past two months, though Stefanut is confident more will come as routing via the Danube becomes more efficient.

Any increase in supplies is critical after the war in Ukraine sparked growing fears of a food crisis. At the World Economic Forum in Davos, Von der Leyen accused President Vladimir Putin of using “hunger and grain to wield power” as she decried Russia’s bombing of grain warehouses and blockading of Ukrainian ships filled with wheat in the Black Sea. About three-quarters of Ukrainian harvests are typically sold abroad, and it’s a key exporter to Africa, Asia and the Middle East as well as Europe.

Ukraine’s agriculture minister expects another 30 to 40 million tons of grain will need to be exported after harvests this summer and fall. While grain can be stored, farmers need to sell it to get funds for planting 2023 supplies, with winter-crops like wheat sown in just a few months.

Kees Huizinga, a Dutch farmer who lives in Ukraine and employs 400 people, used to be able to get a 25-ton truckload of his grain to Odesa terminals on the Black Sea and back within a day. Drivers are now spending a week in travel, queues and border checks — at triple the cost — to take deliveries on a new route, unloading just over the border in Romania. From there, it still needs to weave to its final destination.

The EU has exempted grain imports from requiring veterinary or phytosanitary certificates to ease the transit. But in the three weeks to mid-May, Huizinga had only shipped out 150 tons. Normally, that would load in just a few hours. He worries that once Romania begins its own harvest soon, the logjams could worsen.

“It’ll be a disaster,” Huizinga, who farms 15,000 hectares and milks 2,000 dairy cows 200 kilometers south of the capital, Kyiv, said at a conference in Geneva. For now, “at least you can do something. But they start harvesting in one-and-a-half months, and then it’s over. All the local guys, they need their own infrastructure.”

Restoring that isn’t going to happen anytime soon. Lithuania is leading an effort to try and free up Odesa, but that’s also proving complicated because of the security in the Black Sea.

Lithuania could handle some 8 million tons a year via its Klaipeda port on the Baltic, though can only manage to get 1 million tons via Polish railways, according to the country’s transport minister. A trial rail shipment of agricultural goods from Ukraine took three weeks.

“Alternatives to Odesa simply don’t exist to send the amounts of grain that Ukraine has accumulated and will accumulate over the summer,” Gabrielius Landsbergis said on May 26. “We either need to accept that grain will be rotting, a part of the world will face food shortages, prices will rise, or we need to find ways how to unblock Odesa.”

For now, the most realistic solution remains Romania, Constanta and the Sulina Canal that links the Black Sea with the Danube. The port’s customs agency has added staff to help handle the increase in shipments, with ships lining up to enter. The Romanian railway company has decluttered its port links and started improvement works, which may result in a 30% to 40% increase of transport capacity as soon as next year, port manager Florin Goidea said.

“We expect much larger quantities to arrive, this is only the beginning,” he said. “This summer will be very crowded. It won’t be easy for us, but we have to find the solutions.”