The UN's highest court on Friday ordered Nicaragua to pay Costa Rica compensation for environmental damage to protected wetlands on the river San Juan, setting the sum of $380,000.
But the figure was well below the $6.7 million demanded by Costa Rica for the harm done to the area, and to compensate its efforts to restore it.
"The court concludes that the total amount of compensation to be awarded to Costa Rica is $378,890.59," judge Abdulqawi Ahmed Yusuf told the International Court of Justice (ICJ).
Managua has until April 2 to pay the amount, after which it will incur a higher rate of interest, the judge said at the court in The Hague, in its first ever compensation ruling for environmental damage.
Nicaraguan ambassador Carlos Arguello said his country was pleased with the outcome.
"We consider this to be a fair assessment of the court," he told AFP.
"From the outset, President (Daniel) Ortega had stated that Nicaragua was willing to compensate for what was fair and reasonable, but Costa Rica's proposal, Costa Rica's request, was quite exaggerated," Arguello said.
The dispute centres on a tract of land known in Costa Rica as Isla Portillos and in Nicaragua as Harbour Head -- a biological preserve lying in a border area long disputed by both Central American nations.
The compensation ruling came more than two years after the ICJ found that Costa Rica had sovereignty over the area, basing its ruling in part on an 1858 treaty between the two countries.
The ICJ said Nicaragua had violated its neighbour's territory in 2010 by sending a small military contingent to set up an outpost there.
It also undertook dredging in the San Juan river and excavated three canals in the sensitive wetlands area.
- String of disputes -
In December 2015, the court reproached Managua for violating San Jose's right to navigation in the waters and ordered the two countries to negotiate an amount of compensation.
But the neighbours failed to reach a deal, so the issue trundled back to the ICJ so judges could set the compensation amount.
The case is one of several disputes between the two countries which have ping-ponged back and forth at the UN's highest court, which was set up in 1945 to rule on border and territorial disputes between nations.
Later on Friday, judges were also to rule on two further border disputes between the Central American neighbours.
Costa Rica wants the ICJ to set its maritime boundaries on both its western Pacific Ocean coast and in the Caribbean Sea to the east.
The two countries first held negotiations in 1976 to try to reach an agreement on the border which broadly follows the San Juan river, but talks have dragged on.
The case was first lodged with the ICJ in 2014, when Costa Rica maintained it had "exhausted its diplomatic means" to resolve the row.