UNITED NATIONS (Reuters) - North Korea accused Mexico on Wednesday of illegally detaining one of its ships with some 50 crew and warned it would take “necessary measures” to release the vessel, which United Nations sanctions monitors say belongs to a blacklisted shipping firm.

North Korea's new deputy U.N. ambassador An Myong Hun speaks during a news conference in front of portraits of former leader Kim Jong-il (R) and former president Kim Il-sung in New York April 8, 2015. REUTERS/Eduardo Munoz

The 6,700-tonne freighter Mu Du Bong, which had come from Cuba, ran aground in July on a reef 8 miles (13 km) northeast of Tuxpan in Mexico’s Veracruz state. Mexico said the ship remains in the port of Tuxpan.

North Korea’s Deputy UN Ambassador An Myong Hun told a small news conference on Wednesday that the Mu Du Bong was not linked to the blacklisted firm, Ocean Maritime Management Company, and therefore not subject to U.N. sanctions.

He said North Korea, officially known as the Democratic People’s Republic of Korea (DPRK), had paid an undisclosed sum to Mexico for damages to the reef where the ship had run aground and now the ship and its crew should be released.

“This ship is totally a peaceful and legitimate commercial ship which sails under the direction of the Ministry of Land and Sea Transportation,” An said. “The detention of Mu Du Bong is a rampant violation of the dignified sovereignty of the DPRK.”

“We will take necessary measures to make the ship leave immediately,” he added.

However, Hugh Griffiths, coordinator of the U.N. panel of experts that monitors sanctions violations, said there was evidence to prove the Mu Du Bong belonged to the Ocean Maritime Management Company more “than any other vessel on the high seas.”

“So in that sense, disproving the link is the hardest nut to crack,” he told Reuters. “The Mu Du Bong is a slam dunk.”

North Korea is under U.N. sanctions due to its nuclear tests and missile launches. In addition to an arms embargo, Pyongyang is banned from trade in nuclear and missile technology and is not allowed to import luxury goods.

The U.N. Security Council last July blacklisted Ocean Maritime for arranging an illegal shipment on the Chong Chon Gang, which was seized in Panama and found to be carrying arms, including two MiG-21 jet fighters, hidden under thousands of tonnes of Cuban sugar.

Ricardo Alday, spokesman for Mexico’s U.N. mission, said his country was fulfilling its international obligations by abiding by U.N. Security Council resolutions and that it was not “forcibly detaining” the ship.

He said there were 33 crew members of the Mu Du Bong, who all held North Korean passports.

“They have absolute freedom of movement. They sleep in a local hotel and the Mexican government has made sure, from day one, that they are and remain in good physical and psychological shape,” Alday said in a statement.