A cargo ship without power and stranded in heavy seas in waters off the Royal National Park in Sydney's south is now stable.
The Portland Bay, which is registered in Hong Kong, left Wollongong this morning but then lost power around 7am.
It deployed two anchors to stop it drifting into the rocks near the Royal National Park, but conditions hampered any rescue or repair efforts.
LIVE UPDATES: Thousands evacuated in Sydney floods
Two tugboats have reached the vessel and another is expected to arrive soon, incident controller of the operation John Finch said.
The rescue operation will involve "slowly" retrieving the anchors, then "getting the vessel towed out to deep safe water".
"That's probably going to take two to three hours, because the vessel, when she anchored, deployed both her anchors," Finch said.
The tugboats will need to brave eight-metre swells during the rescue operation and tow the boat much further out from the coast.
Then the plan is for the marine engineer to make an engine repair using spare parts once the ship is out in safe water.
EXPLAINED: When is it going to stop raining in Sydney?
Finch said the repairs will take another four to six hours and hopes the ship would be back on course by morning, but it was too early to tell.
Earlier there was discussion of evacuating some of the 21 crew members but now the decision has been made to keep them on board.
"There was an initial plan this morning to evacuate the non-essential staff but once the vessel deployed it's anchors and it was in a stable condition, and it was no long drifting towards the rocks the master asked to keep his crew on board," Finch said.
A spokeswoman for the Australian Maritime Safety Authority said its helping the NSW Port Authority with the incident.
"The 170 m vessel, the Portland Bay, lost main engine power this morning and is drifting off Garie Beach. The ship has dropped anchor and is currently holding position," she said.
Bizarre sight on Sydney beach
"AMSA has tasked the Essendon Challenger jet to attend the scene which will provide a communication link and location data.
"A salvage towing vessel has been tasked from Port Botany."
NSW Water Police tugs from Port Botany, the Volunteer Marine Rescue service, the Australian Navy and emergency services are also involved.