Story highlights The Mu Du Bong was detained after it ran aground off Mexico's coast in July

North Korea says there's no reason to hold the ship and accuses Mexico of human rights violations

Mexico says it followed proper protocol because the ship's owner skirted U.N. sanctions

(CNN) North Korea accused Mexico of illegally holding one of its cargo ships Wednesday and demanded the release of the vessel and crew.

The ship, the Mu Du Bong, was detained after it ran aground off the coast of Mexico in July.

Mexico defended the move Wednesday, saying it followed proper protocol because the company that owns the ship, North Korea's Ocean Maritime Management company, has skirted United Nations sanctions.

"Because the company has avoided the sanctions imposed by the U.N. Security Council, the Mexican government is acting on the basis of its international obligations as a responsible U.N. member state," the Permanent Mission of Mexico to the United Nations said.