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 when a local court ruled in favour of a financial fund.
The fund says it is owed $370m (£233m) by the Argentine government as a result of its 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 to have left the port.
Tribunal president Shunji Yanai ordered that the vessel should be resupplied if needed.
The court said that holding the ship was "a source of conflict that may endanger friendly relations among states".
Last month, sailors on board the Libertad reportedly drew guns on Ghanaian officials after they tried to board the vessel to move it to another berth.
Immunity 'violated'
An agent for the Ghanaian government who was at the court said after the ruling that it would "carefully consider the tribunal's order with a view to ensuring that it is given effect."
Financial fund NML Capital has so far not commented on the ruling.
NML is a subsidiary of US hedge fund Elliot Capital Management, which is one of Argentina's former creditors.
Argentina had argued that the seizure violated the immunity of military vessels under international maritime law.
In 2001 and 2002, Argentina defaulted on more than $100bn 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.