President Donald Trump said China may have hacked the emails of Democratic officials to meddle with the 2016 presidential election, countering the view of U.S. intelligence officials who have said Moscow orchestrated the hacks.

In an interview transcript published on Sunday, Trump gave no evidence backing his allegation, first made on the eve of the Nov. 8 presidential election, that China could have hacked the emails of his rivals.

"If you don't catch a hacker, OK, in the act, it's very hard to say who did the hacking," the president said in an interview with CBS Face the Nation. "[It] could have been China, could have been a lot of different groups."

The hackers roiled the presidential campaign by making public embarrassing emails sent by Democratic operatives and aides to Democratic presidential candidate Hillary Clinton. One email showed party leaders favoring Clinton over her rival in the campaign for the party's internal nomination contest.

Trump has been dismissive of the statements by intelligence officials that Moscow hacked the emails to help Trump win the election. During the Sept. 26 presidential debate with Clinton, Trump said China was one of many actors that could have been behind the hack, including "somebody sitting on their bed that weighs 400 pounds."

Like Russia, China is a longstanding cybersecurity adversary of the United States. Trump in recent weeks has softened his criticism of Chinese trade policies as Washington seeks Beijing's support in diffusing military tensions with North Korea.

Before Trump was elected, he pledged to improve relations with Moscow. Russia has denied any involvement in the hacks. Lawmakers are currently investigating whether Trump's campaign team had ties with Russia.

Plans for North Korea 'a chess game'

In the same interview, Trump discussed North Korea's missile tests and leader Kim Jong-un.

In the taped interview broadcast Sunday, the president would not discuss the possibility of military action, saying: "It is a chess game. I just don't want people to know what my thinking is."

Separately, Trump's national security adviser H.R. McMaster, said North Korea's most recent missile test represents "open defiance of the international community." He said North Korea poses "a grave threat," not just to the U.S. and its Asian allies, but also to China.

Speaking on Fox News Sunday, McMaster said it is important "for all of us to confront this regime, this regime that is pursuing the weaponization of a missile with a nuclear weapon."

"This is something that we know we cannot tolerate," McMaster said.

On Saturday, a North Korean mid-range ballistic missile broke up a few minutes after launch, the third test-fire flop this month. The program's repeated failures over the past few years have given rise to suspicions of U.S. sabotage.

National security adviser H.R. McMaster said North Korea is 'pursuing the weaponization of a missile with a nuclear weapon.' (Jung Yeon-je/AFP/Getty Images)

In the CBS interview, the president was asked why the North's rockets keep blowing up.

"I'd rather not discuss it," he said. "But perhaps they're just not very good missiles. But eventually, he'll have good missiles."

He added: "And if that happens, we can't allow it to happen."

Kim Jong-un a 'smart cookie'

Trump also called North Korea's leader "a pretty smart cookie" for being able to hold onto power after taking over at a young age. "People are saying, 'Is he sane?' I have no idea," the president said.

North Korean ballistic missile tests are banned by the United Nations because they are seen as part of the North's push for a nuclear-tipped weapon that can hit the U.S. mainland.

McMaster said that Trump "has made clear that he is going to resolve this issue one way or the other," but that the president's preference is to work with China and others to resolve it without military action.

Trump and McMaster both said the U.S. hasn't ruled out military action against Kim Jong-un's regime. (KRT/Associated Press)

That means, McMaster said, working to enforce current UN sanctions and perhaps ratcheting them up. "And it also means being prepared for military operations if necessary," he said.

Trump said he believes China's president, Xi Jinping, has been putting pressure on North Korea over its missile and nuclear weapons programs.

The launch comes at a point of particularly high tension in the region. Trump has sent a nuclear-powered submarine and an aircraft carrier to Korean waters.

The U.S. and South Korea also started installing a missile defence system that is supposed to be partially operational within days.