A Hong Kong flagged cargo ship is drifting near the Great Barrier Reef after it broke down en route to Townsville.

The 186-meter (610-foot), 45,000 tonne ID Integrity was traveling from Shanghai when its engine broke down north of Cairns, Queensland.

The crew immediately dumped some of the ship’s sea water ballast to prevent the bulk carrier to run aground and damage the World Heritage-listed reef. Simon Meyjes, head of the Australian Reef Pilots said that it was “sheer luck” that the Integrity drifted over the reef, narrowly avoiding disaster.

A commercial tug boat, PT Kotor, had reached the ship and towing the vessel away from the Outer Reef. ID Wallem, the ship’s owner stated that the vessel was fortunately empty, preventing pollution spills. Conservationists and environmentalists warned that greater shipping traffic could harm the world’s biggest coral reef, after a Chinese-registered coal carrier left a 3km long scar on the reef before it was salvaged after nine days of drifting.