PORTLAND, Maine -- A federal magistrate judge has ruled that the Nova Star ferry may be released from custody after the ship was seized while the ferry service settled its financial affairs.

Edward MacColl, attorney for Singapore Technologies Maine, says his client's vessel is expected to leave Portland Harbor in Maine within the next few days.

The U.S. Marshals Service seized the 158-metre ship on Oct. 30 while claims seeking payments of more than $3 million were sorted out in federal court in Portland.

MacColl says Singapore Technologies has settled most of its debts, except for a few disagreements with suppliers that weren't considered maritime necessities.

Companies that sold maritime necessities were permitted by law to seize the Nova Star in an attempt to get paid back.

The cash-strapped company operated the ferry between Yarmouth, N.S., and Portland for two years, but was passed over when Nova Scotia opted last month to go with Bay Ferries as the new operator of the service in 2016.