The owner of New Zealand's biggest goldmine must pay the El Salvador government $11 million after its international legal case to mine there failed.
OceanaGold, which is based in Australia and Canada, operates New Zealand's largest mine at Macraes Flat in East Otago, and other mines in Reefton and Waihi.
In a seven-year legal battle, the company brought its case to be able to mine in El Salvador to the World Bank's International Centre for Settlement of Investment Disputes after the country's own system denied it access.
In a case which has tested the extent to which corporations could sue governments, the centre found OceanaGold's case was without merit.
The ruling has been welcomed by anti-trade activists.
An OceanaGold spokesperson said the corporation still believed its plan would have provided a sustainable development opportunity and jobs over many decades.
It still hoped to reach an amicable settlement with the El Salvador government, the spokesperson said.