Stranded cargo ship docks in Sydney

The Portland Bay cargo ship being towed into Botany Bay
The Portland Bay was towed into Botany Bay after being left stricken in large seas. -AAP Image

A Hong Kong cargo ship that was left stricken in heavy seas off the coast of NSW has docked in Port Botany after a multi-day operation.

The bulk carrier Portland Bay was towed into Botany Bay in Sydney's south about 2pm on Wednesday following an order from the Australian Maritime Safety Authority for it to be brought to dock.

Anchors on the 170-metre ship were earlier hauled in as work began to move the powerless vessel.

Other commercial shipping operations were suspended as four tug boats worked to tow the ship through the windswept waters to the port.

The Portland Bay and its 21 crew had been floating south of Sydney after the ship's engines failed on Monday.

The Australian Maritime Safety Authority on Wednesday ordered the ship be towed to port in a legal direction to its master and the salvage team.

"It is vital that the vessel be moved into safe harbour before the next front of bad weather arrives," executive director Mark Morrow said in a statement.

Initial plans to pull the boat to deeper water were scuppered by severe weather, resulting in towing lines breaking.

Tugboats managed to move the Portland Bay further north and it dropped anchor about 1.2 nautical miles from Port Botany.

A turbo fan is believed to be responsible for the engine failures and the problem will take about half a day to fix.