MEXICO CITY (Reuters) – The presidents of Colombia and Nicaragua on Saturday both said they hoped to avoid war and use dialogue instead to solve a dispute over a recent UN court ruling that shifted some of Colombia’s resource-rich water to the Central America country.

The Hague-based International Court of Justice (ICJ) earlier this month shocked Colombia by giving a large expanse of its fishing and potentially oil rich maritime territory to Nicaragua while handing some disputed islands to Colombia in a binding ruling.

Nicaragua’s economic exclusion zone in the Caribbean was expanded by the ruling, giving it access to potential offshore oil and gas deposits as well as fishing rights.

Since the ruling, Colombia has withdrawn from a treaty that binds the country to the UN court’s decisions, and both nations now have warships in the disputed waters.

“We are totally discarding the use of force,” said Nicaraguan President Daniel Ortega, speaking on the sidelines of the inauguration of new Mexican President Enrique Pena Nieto in Mexico City. He added that the country would use communication to achieve peace in the dispute.

Colombia’s Santos echoed Ortega, but he did not take war off the table completely.

“Of course no one wants a war, that is a last resort … The way to fix these types of situations is by entering into dialogue,” said Santos.