WASHINGTON — President Donald Trump attacked China on Thursday following reports that Chinese ships transferred oil to North Korean vessels at sea in violation of U.N. sanctions over the North's nuclear weapons program.

Trump said on Twitter that China had been "Caught RED HANDED," adding he was "very disappointed that China is allowing oil to go into North Korea."

"There will never be a friendly solution to the North Korea problem if this continues to happen!" the president said, without citing the source of his information.

Caught RED HANDED - very disappointed that China is allowing oil to go into North Korea. There will never be a friendly solution to the North Korea problem if this continues to happen! — Donald J. Trump (@realDonaldTrump) December 28, 2017

China accounts for the vast majority of North Korea's external trade and oil supplies. Just two weeks ago, Trump credited China for its help in the U.S.-led pressure campaign against Pyongyang, including support for three U.N. Security Council resolutions this year — the latest last week — over the North's nuclear and missile tests.

Related: U.S. sanctions North Korea missile experts as Russia offers to mediate

However, on Tuesday the South Korean newspaper Chosun Ilbo cited unidentified South Korean government officials as saying U.S. reconnaissance satellites have spotted Chinese ships transferring oil to North Korean vessels some 30 times since October in seas off China. That report was picked up by some U.S. media outlets, including Fox News.

China's foreign ministry has defended its enforcement of U.N. sanctions against North Korea. A ministry spokeswoman said Wednesday she had no information about the latest report, but said China has strictly enforced trade restrictions.

The State Department did not immediately respond to a request for comment on that report. But in a commentary Thursday, Secretary of State Rex Tillerson urged Beijing to exert "decisive economic leverage" on Pyongyang.

"China has applied certain import bans and sanctions, but it could and should do more," he wrote in The New York Times.

Ship-to-ship trade with North Korea at sea is prohibited under U.N. sanctions adopted Sept. 11. The latest sanctions adopted Friday, in response to the test of a North Korean intercontinental ballistic missile, also impose sharp reductions on imports of refined oil products by the isolated nation.

Last month, the Treasury Department sanctioned six North Korean shipping and trading companies and 20 of their vessels, and published photos of what it said was a North Korean vessel on Oct. 19 possibly transferring oil to evade sanctions. The statement did not specify whether Chinese vessels were involved in the transfer. At that time, the U.S. also blacklisted four Chinese-based companies and one Chinese individual said to have deep commercial ties with North Korea.

Related: UN Security Council imposes tough new sanctions on North Korea

Trump has blown hot and cold on China's efforts on North Korea, which despite a dramatic increase in sanctions has made major progress this year on perfecting a nuclear-tipped missile that could strike the United States.

On Dec. 15, Trump said Russia — another significant trading partner with North Korea — had failed to help, while China had.

FILE: A security agent takes position at the Great Hall of the People during the opening session of the 19th National Congress of the Communist Party of China in Beijing, China October 18, 2017. Thomas Peter / Reuters

"China is helping. Russia is not helping. We'd like to have Russia's help — very important," Trump told reporters after a phone conversation with President Vladimir Putin.

Also Thursday, Trump sought to remind the world that he's long warned about the dangers posed by North Korea's nukes.

Related: Trump’s 13 biggest feuds of 2017, from ‘Chuck and Nancy’ to LaVar Ball

He tweeted a compilation video that included edited footage of an interview he did with NBC's "Meet the Press" nearly two decades ago.

In the interview, Trump said he'd be willing to launch a pre-emptive strike against North Korea if negotiating "like crazy" didn't work. And he describes the country as "sort of wacko."