An effective monopoly over almost all products entering NSW by sea is set to be broken up by a bill to "unshackle" the Port of Newcastle.
The port in NSW's second biggest city handles few containers because of compensation provisions established when the government sold ports at Botany and Kembla in 2013.
The monopoly lasts for 50 years and affected the later $1.7 billion sale of the Port of Newcastle.
But under a plan that passed the lower house on Tuesday, the current restrictions on the Port of Newcastle would be extinguished once the owners pay a new sale price, set as if the monopoly was not in effect.
Greg Piper's bill to "unshackle the Port of Newcastle from controversial restrictions" now has the support of the government, the independent Lake Macquarie MP said on Tuesday.
"I've agreed to a government amendment to provide a clear path for the port to diversify into containers without the unfair penalties placed on it," he said.
Mr Piper says the bill also has crossbench support.
During debate, Greens MP Jamie Parker said restrictions on the port undermine Newcastle's capacity for growth and are a significant public policy failure.
An "independent and appropriately qualified" person will determine a fair price for the lease.
The Port of Newcastle will have to pay that, less the $1.7 billion it paid in 2014.
"I'm very pleased that a level playing field will be returned to the state's ports and that Newcastle will no longer be shackled to an unfair deal," Mr Piper said.
NSW Farmers president Xavier Martin says an unrestricted Newcastle port could provide up to $2.8 billion in savings for farmers over the next three decades.
"Farmers in the northwest have had their produce trucked past Newcastle to Port Botany, which is wildly inefficient and results not only in extra wear and tear on our country roads, it puts more strain on an already congested Sydney road network," Mr Martin said.
Labor said the government's changed stance on Mr Piper's bill was "a stunning backflip".
"This proves what Labor has been saying all along - privatisation doesn't work," Opposition Leader Chris Minns said.
"They sold off the ports in a dud deal and now are backflipping, costing taxpayers millions. It was the worst privatisation deal signed by any Australian government."
Several Labor MPs spoke on privatisation as the bill was debated.
Mr Minns has vowed to end the practice the government calls "asset recycling" if Labor wins the next election.
During question time, Premier Dominic Perrottet defended the government's actions.
"We know the decisions that we made as a government - opposed by those opposite since 2011 - have unlocked capital that we have been able to use to build," he said.
The premier was asked repeatedly what going back on the deal could end up costing in the future, but did not provide a figure.
Speaker Jonathan O'Dea suggested Mr Perrottet might not know.
"If he does not know the exact figure, perhaps he should say that," he said.
The premier did not provide a number, instead attacking Labor's recent move to use money from WestInvest to fund election commitments.
Selling the incomplete WestConnex motorway created the fund for western Sydney infrastructure.
Labor opposed building and selling WestConnex, and has described WestInvest as "smoke and mirrors".
"It is all smoke and mirrors until it is funding Canterbury Hospital, isn't it?" Mr Perrottet said.