The U.S. has seized a North Korean freighter that was caught shipping coal in violation of U.N. sanctions, the Justice Department revealed Thursday.

The 17,000-ton cargo ship, called the Wise Honest, was stopped in Indonesia last year after it was found to be carrying coal. The ship's captain was charged with violating Indonesian law, and last July, the U.S. filed an action to seize the ship, according to court papers.

Federal prosecutors said the seizure marks the first time the U.S. has taken possession of a North Korean ship for violating international sanctions.

"This sanctions-busting ship is now out of service," said John Demers, assistant attorney general for the Justice Department's National Security Division.

The Wise Honest, North Korea's second-largest ship for carrying bulk cargo, was on its way to American Samoa, U.S. officials said.

On Thursday, the Justice Department asked a federal judge to give the U.S. ownership of the vessel through a civil forfeiture action — the same thing prosecutors do when they seek to take ownership of planes or boats used by drug smugglers. The Justice Department says the U.S. is entitled to take this action because payments to maintain and equip the vessel were made through American banks.

"Our office uncovered North Korea's scheme to export tons of high-grade coal to foreign buyers by concealing the origin of their ship, the Wise Honest," said Geoffrey Berman, U.S. Attorney for the Southern District of New York. "This scheme not only allowed North Korea to evade sanctions, but the Wise Honest was also used to import heavy machinery to North Korea, helping expand North Korea’s capabilities and continuing the cycle of sanctions evasion."

The North Korean ship, "Wise Honest." Department of Justice

The announcement of the seizure came just hours after North Korea launched suspected short-range missiles — the second such weapons test in a week. But Berman said the effort to take control of the Wise Honest had been in the works for some time and was not spurred by North Korea's overnight actions.

The Justice Department said the Korea Songi Shipping Company used the Wise Honest from at least November 2016 through April 2018 — and broke American law by paying U.S. dollars to "unwitting" banks for several improvements, equipment purchases and service expenditures for the vessel.

The March 2018 cargo shipment yielded payments totaling more than $750,000, the Justice Department said.

Berman declined comment when asked if the heavy machinery shipped back to North Korea was used in the country's weapons program.

The seizure follows a report in March by a U.N. panel of experts that found North Korea is successfully evading United Nations sanctions through elaborate smuggling and deceptive tactics, allowing the regime to import oil and ship coal to China and other countries.

The sanctions are designed to deprive Pyongyang of cash for its nuclear weapons and ballistic missile programs and force the regime to abandon its arsenal. The Trump administration has led international efforts to tighten sanctions against North Korea, vowing to impose “maximum pressure” to persuade North Korea agree to relinquish its weapons in return for an end to sanctions.

"These violations render the latest United Nations sanctions ineffective by flouting the caps on the import of petroleum products and coal oil" by North Korea imposed by the U.N. Security Council in 2017, according to the U.N. report. "These transfers have increased in scope, scale and sophistication," it said.

Download the NBC News app for breaking news and politics

Despite U.S. warnings to keep up the economic pressure on North Korea, the regime has not suffered a spike in fuel prices in recent months, a sign that analysts say shows the country is able to secure enough fuel to keep its economy afloat.

North Korea has adapted to sanctions over the years and now employs increasingly sophisticated methods, the U.N. panel found in its March report. Pyongyang used to alter sections of shipping documents but now creates entirely fake registration and other papers that enable it to smuggle illicit cargo through ports around the world.

The regime also steals the identities of other ships and spoofs the location of vessels on the global electronic tracking system for ships, according to the U.N. panel.