For two years, Vale SA's (>> Vale SA) Valemax mega-ships - designed to cut the costs of transporting iron ore to China - have not been allowed to dock at Chinese ports, stalling the miner's $4 billion strategy.

Behind the safety concerns blamed for the ban, industry insiders said the Chinese shipping industry, led by Cosco, lobbied hard to keep out the Brazilian ships, although the state-owned company denies it was ever involved.

But the argument is now moot because Vale on Friday announced a deal with Cosco, and analysts forecast the Valemax ships will soon be docking in China. If they are right, it will mark a long-awaited breakthrough for Vale, allowing it to better compete with Australian rivals BHP Billiton Ltd (>> Benitec Biopharma Ltd) and Rio Tinto Ltd (>> Rio Tinto plc).

Under the new deal, Vale agreed to sell and then lease back four of its mega-ships from Cosco, as well as committing to leasing 10 more vessels to be built by the Chinese company. The financials of the deal have not been released and it remains to be seen which side gave the most ground. But it does mark the end of a long fight that had become important for the two companies to resolve. Both can now claim victory.

COMPETING WITH AUSTRALIA

With the price of iron ore now at five year lows, the deal comes at a vital time for Vale. Without lower freight costs, it risks losing more market share to its Australian rivals, who are not only closer to China, but have also managed to increase production at a staggering rate over the past few years.

The Valemax is the world's biggest dry bulk vessel, spanning the length of three soccer fields bow to stern and costing around $120 million apiece. If they were able to take cargoes directly to China, Vale would save about $7 a ton over current costs, closing the gap with the Australian iron ore producers, who have normally had a $10-per-tonne advantage.

This will protect profits as Vale invests heavily to expand production by 90 million tonnes at its flagship iron ore mine, Carajas.

For Cosco, which offers services from shipbuilding to port operations through subsidiaries and its listed units, China COSCO (>> China COSCO Holdings Company Limited)<1919.HK> and COSCO Corp (>> Cosco Corporation (Singapore) Limited), the deal is a successful defense of the domestic shipping industry against what it saw as the threat of a potential foreign monopoly.

The state-owned company controls over 800 vessels and one of the world's largest dry bulk fleets. Vale's mega-ships were a threat to this business even as it was already suffering from falling freight costs. Since reaching their peak in 2008, shipping prices as measured by the main sea freight index at London's Baltic Exchange <.BADI> have fallen 90 percent.

So industry insiders say Cosco lobbied hard, even though the Chinese economy stood to benefit from the Valemax ships as Chinese steel companies bought cheaper iron ore and shipbuilders built the vessels.

"Essentially, (the deal) marks the end of Vale’s strategy of moving into the shipping industry," said Bocom International analyst Geoffrey Cheng.

Vale argues it was never really trying to break into the shipping market, wanting only to lock in lower long-term freight costs.

For Cosco, the deal also offers a vital stream of income. The group's flagship company, dry bulk carrier China Cosco, has been battling heavy losses over the last five years thanks to strong competition from ships delivered after the financial crisis that caused oversupply as global trade weakened.

Volumes in its dry bulk shipping business have been steadily decreasing over the last three years as the company also restructured its fleet, with iron ore shipments falling 32 percent to 87.5 million tons from 2010 to 2013.

The Valemax ships might reduce freight costs further, but at least under the new deal Cosco is the company that will benefit.

"This cooperation agreement is between a cargo and vessel operator. It’s a win-win situation that plays to their respective advantages," said Zhang Shouguo, executive vice president of the China Shipowners Association.

(Additional reporting by Silvia Antonioli in London. Editing by Andre Grenon)

By Stephen Eisenhammer and Brenda Goh