The crew of a container ship bound from Oakland to Seattle had a high-seas adventure few had counted on when they found themselves stranded in deep water just outside of San Francisco Bay over the weekend.

The Wan Hai 176, a 564-foot container ship with 21 people aboard, lost engine power Friday and drifted about seven miles off the coast of Point Reyes before it was rescued and towed back into the Bay on Sunday, according to the U.S. Coast Guard.

Favorable weather conditions Sunday allowed the Delta Deanna, a 112-foot tug, to pass tow lines to the Wan Hai 176’s crew at its anchored location off the coast of Point Reyes.

Once lines and anchors were secured, the tug, along with the tugs Stacey Foss, Delta Billie and Rachael Allen, safely got the ship into the Bay.

The Wan Hai 176, loaded with 783 cargo containers, is towed into port at San Francisco on Sunday afternoon.(Photo by Petty Officer 3rd Class Taylor Bacon/U.S. Coast Guard)

The Coast Guard Captain of the Port of San Francisco ordered the cargo ship to remain at anchorage until its engines have been fixed and Coast Guard personnel have inspected the ship. The Wan Hai 176 had been scheduled to arrive at Seattle on Sunday evening, but a position tracker on the VesselFinder website showed that it remained anchored in the Bay late Monday.

Once the Captain of the Port order is removed, the ship will be escorted out of the San Francisco Bay with tugs.

The Wan Hai 176, a Singapore-flagged vessel, carries miscellaneous material in 783 containers and has no reported hazardous materials. It reportedly carries 39,000 gallons of fuel.

There were no reports of injuries. The vessel had departed the Port of Oakland just before noon on Friday and was headed to Seattle before it lost power.