An offer to buy a supply ship detained in Aberdeen for more than a year has been accepted, a union has said.
The Malaviya Seven was detained in June last year, and again in October, under merchant shipping regulations.
The 24 crew are understood to be owed almost £700,000 in total.
The ITF union said an offer had been accepted by the courts for the Malaviya Seven. It is for an undisclosed amount but it is understood to be enough to cover wages.
The vessel failed to sell at auction last month. The auctioneer withdrew the vessel from sale after only receiving a bid of £300,000.
A sheriff had ruled in September that it could be sold at public auction.
Six crew members then headed home amid emotional scenes at Aberdeen International Airport.
The remaining six were staying until the ship was sold.
Two are expected to leave on Wednesday morning, with the final four staying with ship.