New Zealand and the United States have won a trade dispute with Indonesia.
Both countries took cases against Indonesia's restrictions on importing food and animal products, including beef and poultry.
The import restrictions covered products such as apples, grapes, potatoes, onions, flowers, juice, dried fruit, cattle, chicken and beef, the US trade office said when it challenged the measures last year.
A World Trade Organisation (WTO) dispute panel ruled against Indonesia across the board in the twin cases on Thursday.
It found all 18 of Jakarta's measures were prohibited under WTO rules dating to its predecessor, the General Agreement on Tariffs and Trade (GATT).
The arbitrators urged Indonesia to bring its measures into line.
Trade Minister Todd McClay said the ruling was an important result for New Zealand farmers.
Trade access to Indonesia had already improved and now the WTO had upheld the complaint access should get even better, he said.
The barriers, which included sale restrictions, restrictive licence terms and a requirement to buy domestic products, are estimated to have cost the New Zealand beef industry between $500 milion and $1 billion.
It had long been an irritant in relations between the two countries after New Zealand beef exports dropped by 80 percent when Indonesia introduced the restrictions.
Former Prime Minister John Key raised the matter when he visited Indonesia earlier this year and said at the time both countries wanted to resolve the dispute before the WTO panel made its ruling.
In the end, however, New Zealand was not able to reach a deal with Indonesia and instead must now rely on today's WTO ruling.
Indonesia could still appeal the ruling; all parties have 60 days to do so.
Mr McClay said despite the dispute relations between the two countries had remained strong.