Image copyright AFP PHOTO/KCNA VIA KNS Image caption US tensions with North Korea and its leader Kim Jong-un (pictured) have flared in recent weeks

A military response to North Korea would be "horrific" but remains an option, the top military adviser to US President Donald Trump says.

Gen Joseph Dunford, chairman of the US Joint Chiefs of Staff, made the comments while visiting China.

He was responding to remarks by a top Trump aide ruling out military action over North Korea's nuclear programme.

Tensions have flared between the US and North Korea after Pyongyang made advances in its missile testing.

Mr Trump has warned the North that it faces "fire and fury", while Pyongyang has threatened to strike the American territory of Guam.

But the sharp rhetoric of last week has since softened, with North Korea leader Kim Jong-un putting the Guam plans on hold - a move praised by President Trump.

Chief White House strategist Steve Bannon said on Wednesday there could be no military solution to the stand-off.

"Until somebody solves the part of the equation that shows me that 10 million people in Seoul don't die in the first 30 minutes from conventional weapons, I don't know what you're talking about, there's no military solution here, they got us," he told The American Prospect.

Gen Dunford agreed a military solution would be "horrific" but went on to say "what's unimaginable to me is not a military option".

"What is unimaginable is allowing [North Korean leader Kim Jong-Un] to develop ballistic missiles with a nuclear warhead that can threaten the United States and continue to threaten the region."

He said President Trump "has told us to develop credible, viable military options, and that's exactly what we're doing".

Media playback is unsupported on your device Media caption South Koreans give their views on Trump's strategy on North Korea

A senior Chinese military official who met Gen Dunford told him that military action should be ruled out and that "dialogue" was the only option, the Chinese defence ministry said.

China is the North's only major ally. The US has criticised China for not doing enough to rein it in, but Beijing says it has begun halting iron, iron ore and seafood imports from North Korea, in line with new UN sanctions.