Trump slams China via Twitter: 'They do NOTHING for us with North Korea, just talk'

President Donald Trump criticized China via Twitter on Saturday, attacking the country for not putting enough pressure on North Korea to pull back its weapons program.

"I am very disappointed in China. Our foolish past leaders have allowed them to make hundreds of billions of dollars a year in trade, yet ... they do NOTHING for us with North Korea, just talk. We will no longer allow this to continue. China could easily solve this problem!" Trump said.

North Korea had tested an intercontinental ballistic missile (ICBM) on Friday that some experts estimated could reach California. The test was meant to be a "grave warning to the US" not to provoke the country, North Korean leader Kim Jong Un said, according to Pyongyang's official news agency KCNA.

Click through images of President Trump addressing members of law enforcement:

Earlier in July, North Korea had demonstrated its intercontinental range by testing a missilethat experts said could reach Alaska, but the latest development is a significant milestone that prompted South Korea to announce it would begin talks with the Trump administration on building up its own ballistic missiles.

Trump has at different points during his presidency criticized and praised China for its approach to North Korea. Earlier in July, Trump criticized the country on Twitter for increasing trade with the hermit kingdom.

"So much for China working with us - but we had to give it a try!" he said.

Yet as early as May, Trump had conceded that China was "trying hard" to dissuade North Korea from its missile tests.

"While I greatly appreciate the efforts of President Xi & China to help with North Korea, it has not worked out. At least I know China tried!" he said in late June.