At Pier 16 in Hamilton Harbour, another chapter in the sad decline of the city's once-dominant steel industry is playing out as cranes load huge mounds of unwanted iron ore onto a ship, bound for mills in China.

Carting off the vital steel-making raw material from United States Steel Corp., which idled its blast furnace here three years ago, suggests the mill won't be restarting any time soon, if ever.

And yet across the harbour a second ship highlights an emerging economic engine for Hamilton – the booming agrifood sector. The Federal Yukina is waiting to dock alongside Parrish & Heimbecker Ltd.'s newly built dome-shaped grain silos, where it will begin loading up the fall harvest of Ontario soybeans for export to the Netherlands.

Story continues below advertisement

From near-obscurity five years ago, agrifood has become a mainstay of Hamilton's port, and the regional economy. Agricultural tonnage shipped through the port doubled between 2008 and 2012 to a record of more than 1.6 million tonnes, led by exports of one million tonnes of soybeans last year. Agricultural products now account for 16 per cent of everything shipped in and out of the port, up from less than 10 per cent in 2009.

This year is expected to be even better as a bumper crop of soybeans, corn and wheat is harvested across Ontario. So far, grain shipments are up 30 per cent from last year. Fertilizer is up 80 per cent.

Steel shipments, on the other hand, are down 35 per cent so far this year, compared to 2012. Shipments of coke, a key steel-making input, are down 92 per cent.

"Agriculture is the new steel for Hamilton," said Ian Hamilton, vice-president of the Hamilton Port Authority and head of real estate development. "Five years ago, the market for steel collapsed. And that's when it hit home that we had to diversify."

Since then, the port has attracted $200-million in new investment, including $40-million in various agriculture-related projects, such as new and expanded storage and handling for grains and fertilizer. In 2007, Bunge Ltd. expanded its canola processing plant and Biox Corp. opened a 67-million-litre biodiesel plant at the port.

"Everything you can see from here down to there is alive and well," said Hamilton Mayor Bob Bratina, pointing out over the harbour toward the Burlington Bay Bridge. "We're running out of space. That's probably our biggest problem. We don't have enough space to put people who want to be here."

So the port authority is looking for additional land to feed future expansion, much of it linked to agrifood – already a $1.3-billion industry in the city. Among other things, the port is eyeing U.S. Steel's underused 400-hectare site that dominates the waterfront.

Story continues below advertisement

"If the land mass is there, they will come," said Bruce Wood, president and chief executive of the port authority. "If U.S. Steel ever gave up or sold some of their property, that's a game changer."

The port has ambitious plans to boost tonnage capacity by expanding rail links that would double the length of trains that can access the harbour, to 100 cars from 50. Efforts are also under way to attract new value-added manufacturers, such as margarine makers, distilleries and breweries plus a flour mill to help feed a nearby Maple Leaf Foods mega-bakery, opened in 2011.

"A lot of the flour mills in Canada are old," Mr. Bratina said. "You have grain. You have a bakery. Why not make flour?"

Parrish & Heimbecher, one of the port's newest tenants, invested $20-million to build two 30,000-tonne multi-use storage domes, capable of handling everything from soybean and sugar to fertilizer. It's now exploring the possibility of adding substantially to that capacity. "We have plans to grow our business on this site," said Matthew Gardner, operations manager for Eastern Canada.

Ontario consumes less than half of the province's swelling production of wheat and soybeans. The surplus needs to find a way to hungry markets in Europe, Asia and Latin America, Mr. Gardner pointed out.

Across the harbour at grain merchant Richardson International Ltd., a steady stream of double tractor-trailers is unloading wheat from as far away as Owen Sound and Trenton, Ont. At the peak of the harvest, as many as 240 trucks per day are weighed in, their load tested for quality and then cycled through three unloading pits.

Story continues below advertisement

Thanks to a $5.5-million expansion in 2008, tonnage has grown 35 per cent. "As agriculture has boomed, we've benefited too," explained Riley Verhelst, Richardson's director of operations.

Hamilton Harbour is also becoming a key conduit for fertilizer, including potash from Saskatchewan and urea from the Baltics. Handlers such as Agrico Canada Ltd. have seen inbound tonnage more than double since the recession, buoyed by demand from Ontario farmers, who have vastly expanded corn acreage.

(Editors note: An earlier online version has been corrected to indicate that the Parrish & Heimbecher investment was to build two 30,000-tonne multi-use storage domes, not 30-tonne. And Riley Verhelst is Richardson's director of operations. His surname was misspelled.)