
(CNN) -- Costa Rica and Nicaragua both must refrain from sending or maintaining civilians, security forces or police in a disputed border area, the International Court of Justice ordered Tuesday, offering each side something it could claim as a victory.
Tensions between the two countries have flared over Calero Island, a parcel of land on the Atlantic coast, since last year.
In November, Costa Rica's foreign ministry said the country had filed a lawsuit in the court to end a situation that "threatens imminent and irreparable harm" to Costa Rica. The suit asked the court to stop "the construction of a canal on Costa Rican soil," the ministry said then.
Nicaragua has claimed it has never entered Costa Rican territory and has only worked on its land.
The court's order was a provisional measure while the case is before the judges. It may be several years before a final ruling is made.
The barring of any persons from the disputed area was a unanimous decision. The court did not order Nicaragua to refrain from dredging.
By a 13-4 vote, the justices said that Costa Rica could send personnel to the area to protect the environment, but only in a manner that won't escalate tensions.
The judges also ordered Nicaragua and Costa Rica to "refrain from any action which might aggravate or extend the dispute before the court or make it more difficult to resolve."
Finally, all the judges agreed that both countries will inform the court of their compliance with the order.
The International Court of Justice is the United Nation's high court, based in The Hague.
Costa Rican President Laura Chinchilla praised the court's ruling, calling the decision "just."
"First, because it sends a clear message that borders cannot be redefined in a unilateral manner, or through force, and second, because it creates the conditions ... that allow for two friendly nations to return to dialogue," she told CNN en Espanol.