Thirty Indonesian fishermen have finally been paid their outstanding wages by a South Korean firm after a series of legal battles in New Zealand lasting three years that led to two ships being impounded.

A settlement was reached after a conference in the High Court in Christchurch Thursday. The crew-members had been seeking NZ$5 million (US$3.4 million), but the final payout was not revealed.

The case began after Oyang 70, one of three vessels owned by Sajo Oyang Corporation, sank in 2010 with the loss of six lives. It was being chartered by New Zealand company Southern Storm Fishing (2007), which later went into liquidation, website Stuff reported.

Sajo Oyang was compelled to forfeit its other two ships, Oyang 75 and Oyang 77, to the New Zealand authorities over fishing offences in 2012 and 2014, though they were released under a legal bond. The Oyang 75 was valued at NZ$11 million (US$7.5 million) at the time and the Oyang 77 at NZ$1.5 million (US$1 million).

Having not been paid, the crew members claimed that they had an “interest” in the ships and were therefore entitled to “relief” against forfeiture under the New Zealand Fisheries Act. Sajo Oyang opposed the application and sought the return of the two vessels.

Verdicts in favour of the crew-members in several lower courts were overturned on appeal, but the Supreme Court ruled Thursday that they were eligible for compensation. Justice Nick Davidson said it did not matter if the crew had not worked on the actual vessel that had been forfeited, or whether their claims were lodged before forfeiture.

He said the two forfeited ships would be returned to Sajo Oyang after it had paid the money owing to the crew-members and settled a bill of NZ$500,000 (US$340,683) with the Ministry of Primary Industries.

It took so long to settle the case that one of the crew-members died during the process, though the claim was pursued by his estate.