A UN court has ordered the release of an Argentine naval ship impounded by Ghana over a debt dispute.
The UN International Tribunal for the Law of the Sea, based in Germany, ruled that the ARA Libertad had immunity because it was a military vessel.
The ship has been held in the port of Tema since October by order of a court in a case brought by NML Capital, a financial fund.
The fund says it is owed $US370 million by the Argentine government as a result of a debt default a decade ago.
A skeleton crew has stayed on board the three-masted training ship since about 300 personnel and naval cadets flew home in October.
The tribunal in Hamburg ordered that Ghana should "forthwith and unconditionally release the frigate ARA Libertad" and ensure the ship and its crew can leave Ghanaian waters.
It set a deadline of 22 December for the ship's departure.
The BBC reports NML Capital is a subsidiary of US hedge fund Elliot Capital Management, which is one of Argentina's former creditors.
In 2001 and 2002, Argentina defaulted on more than $US100 billion of debt. Most of these loans were subsequently restructured, giving creditors about 30% of their money back.
However, some creditors including Elliot chose to hold out, pursuing the Argentine government through the courts.