WASHINGTON — The U.S. said Thursday it has seized a North Korean cargo ship that was used to violate international sanctions, a first-of-its kind enforcement action that comes at a tense moment in relations between the two countries.

The “Wise Honest,” North Korea’s second largest cargo ship, was detained during an April 2018 stop in Indonesia and will be moved to American Samoa, Justice Department officials said.

Officials made the announcement hours after the North Korea fired two suspected short-range missiles toward the sea, a second weapons launch in five days and a possible signal that stalled talks over its nuclear weapons program are in trouble.

Justice Department lawyers laid out the case for confiscating the ship in a complaint filed in New York, arguing that payments for maintenance and operation of the vessel were channeled through U.S. financial institutions in violation of American law.

“This sanctions-busting ship is now out of service,” said Assistant Attorney General John Demers, the Justice Department’s top national security official.

The timing of the complaint was unrelated to the missile launch, U.S. officials said.

The 581-foot (177 meters) Wise Honest was used to transport North Korean coal to China, Russia and other countries, generating badly needed revenue to a country that is under U.N. sanctions because of its nuclear weapons program.

North Korea sought to disguise the ship’s operations by listing various other countries for its nationality and the origin of its cargo, according to the complaint.

Indonesian authorities intercepted and seized the Wise Honest in the East China Sea a month after it was photographed at the port of Nampo, North Korea, where it took on a load of coal.

The U.S. has prosecuted people and businesses for violating sanctions but has never before seized a North Korean ship. The country will have an opportunity to contest the seizure in court. If the U.S. prevails, it will be able to sell the vessel.

President Donald Trump and North Korean leader Kim Jong Un held two summits focused on the North’s nuclear program but have made no discernible progress toward a deal that would eliminate its weapons.