The Nova Star ferry is expected to depart Portland Harbor within the next few days after Monday’s ruling by a federal magistrate judge that the ship may be released from custody.

The vessel will head south to warmer waters, said Edward MacColl, an attorney for the ship’s owner, Singapore Technologies Marine.

The 528-foot ship was seized and placed under arrest by the U.S. Marshals Service on Oct. 30 while claims seeking payments of more than $3 million were sorted out in U.S. District Court in Portland.

The Singapore shipbuilder has posted a $750,000 surety bond, an amount that substantially exceeds the sum of remaining claims.

The ruling Monday by U.S. Magistrate Judge John Rich III essentially released the ship on bail.

MacColl said he did not know the ship’s destination or whether it has been chartered for another service. He said a prospective operator examined the ship last week.

Monday’s emergency court hearing – attended by nine attorneys for companies with claims against the ship – was a sad contrast to the cheers that greeted the Nova Star when it arrived in Yarmouth, Nova Scotia, in April 2014.

The ferry, which carried passengers between Portland and Yarmouth for two summers, was seen as an economic lifeline that would bring American tourists to the economically depressed area of southwest Nova Scotia.

But the service carried far fewer passengers than expected, and the costs to Nova Scotia taxpayers were staggering – $41 million (Canadian) in just two years.

In October, the province severed its relationship with the ferry operator, Nova Star Cruises, and awarded the ferry contract for next summer to a Canadian operator, Bay Ferries.

Even though Nova Star Cruises ended the season in debt and lost its charter rights to the vessel, federal law allows companies that sold it “maritime necessities,” such as fuel oil, to seize the ship and force the owner to sell it at auction to raise money to pay them back.

Local companies that were owed money included Portland Pilots, McAllister Towing, Pratt Abbott and Sprague Operating Resources.

The Singapore shipyard has resolved most of those debts but still has disagreements with some providers of supplies and services that were not maritime necessities, MacColl said. He said the company has a dispute with Century Casinos, which on Sunday removed 70 slot machines it owns from the ship, and with laundry service company Pratt Abbott over the cost of replacing linens.

MacColl said the owner wanted the Nova Star to leave Portland last week, but those plans were stopped by Century Casinos, which wanted more time to get a crew to Portland so it could remove the slot machines. The two sides disagree about who should pay for the cost of keeping the ship in custody during the wait for the slot machines to be removed. MacColl said those costs amounted to $15,000 to $16,000 a day.

He said the Nova Star will leave the harbor after it’s refueled and provisioned for a sea voyage.