Trade unions have accused Scott Morrison of deliberately stoking division after he threatened to intervene in looming maritime strikes ahead of Christmas.
The government is considering the potential economic risks posed by strikes, including industrial action at Patrick Terminals which is on hold until at least December 10.
"We encourage the parties to this dispute to negotiate in good faith and to resolve their issues to get this sorted," the prime minister told an Australian Industry Group function on Tuesday night.
"But at the same time, I want to assure you that our government will take action, if needed, to protect the Australian economy from serious harm."
The Australian Council of Trade Unions said Mr Morrison was demonising wharfies
ACTU secretary Sally McManus said the country did not need more division and conflict, with wharfies deserving a reasonable pay rise.
"Essential workers did their job around the clock the last two years in the hardest of circumstances," Ms McManus said.
"It is not reasonable we continue to experience record low wage growth whilst many big businesses, such as the multinational shipping companies, delivered bumper profits."
Union figures have shown workers at NSW ports serviced 28 per cent more ships in September this year compared to September 2020.
"The last thing our country needs is governments wanting to take more rights off working people and siding with foreign multinationals over their own citizens," Ms McManus said.
"Instead, they should be stepping up and doing the work to change our industrial laws to stop employers turning permanent jobs into casual jobs."
It comes as the prime minister unveiled a Productivity Commission inquiry into Australia's maritime logistics system.
Mr Morrison said the terms of reference for the Productivity Commission inquiry into Australia's maritime logistics system will be released soon.
He wants the commission to report back by mid-2022.
"Having supported our economy strongly on the demand side through the pandemic, our focus inevitably turns to the supply side levers as the economy recovers," Mr Morrison said.
"Because it's those supply side levers that can have such a big impact on inflationary pressures that put pressure on all Australians."
Australian Associated Press
Sign up for our newsletter to stay up to date.