The U.N. ICJ ruled in favor of Colombia's claim to a set of islands in the Caribbean also claimed by Nicaragua. U.N. photo/Andrea Brizzi

The U.N. International Court of Justice ruled Monday that Colombia has sovereignty over several disputed islands in the Caribbean also claimed by Nicaragua.

The judgment settled the dispute over a chain of seven islands, formally brought before the ICJ in 2001, but also extended Nicaragua’s maritime borders, potentially giving it more access to underwater oil and natural gas deposits.

"The court agrees that the achievement of an equitable solution requires a line of delimitation to allow the parties to attain their maritime rights in a mutually balanced way," Judge Peter Tomka said, the BBC reported.

The court ruling was based in part on a 1928 treaty between Colombia and Nicaragua that granted Colombia sovereignty over three of the islands.

In 1980, the new Sandinista government in Nicaragua annulled the 1928 treaty, but the ICJ upheld in in a 2007 ruling.

In its latest judgment, the ICJ ruled that all islands within the archipelago belonged to Columbia.

The islands lie 480 miles off the coast of Colombia and roughly 140 miles off the coast of Nicaragua.