The 4th U.S. Circuit Court of Appeals in Richmond issued its ruling on Monday. It overturns an earlier decision by a federal judge in Norfolk. That ruling ordered the ship freed for a $1.5 million bond, half of what the Coast Guard originally demanded.

The U.S. Coast Guard has been detaining the ship and its roughly 20-member crew since April in Virginia. During a routine inspection, one of the ship's crew members passed a note to an inspector saying oily bilge water had been discharged overboard.

In its ruling, the appeals court said the federal district court didn't have jurisdiction to provide the relief the ship's owners sought.