A military solution to the North Korean missile threat would be “horrific” but allowing Pyongyang to develop the capability to launch a nuclear attack on the United States is “unimaginable”, the top US military officer has said in Beijing.

The chairman of the US Joint Chiefs of Staff, Marine Corps General Joseph Dunford, told reporters that President Donald Trump directly has “told us to develop credible viable military options and that’s exactly what we’re doing”.

Gen Dunford was responding to questions about Mr Trump’s chief strategist Steve Bannon saying in a new interview that the threat posed by North Korea cannot be handled by force.

“There’s no military solution, forget it,” Mr Bannon told The American Prospect.

A look into North Korea from South Korea's unification observatory in Paju (Lee Jin-man/AP)A look into North Korea from South Korea’s unification observatory in Paju (Lee Jin-man/AP)

“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.”

In Beijing, Gen Dunford said it is “absolutely horrific if there would be a military solution to this problem, there’s no question about it”.

But, he added, “what’s unimaginable is allowing KJU (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”.

General Dunford meeting Chinese president Xi Jinping (Andrew Harnik/AP)General Dunford meeting Chinese president Xi Jinping (Andrew Harnik/AP)

Gen Dunford met later with Chinese President Xi Jinping, during which both men reinforced the importance of exchanges between their militaries in stabilising a relationship frequently marred by disputes over security, diplomacy and trade.

“We both know that you and President Trump are committed to our improvement in military-to-military relations and we have approached it with great commitment, candour and we certainly want to deliver results,” Gen Dunford told Mr Xi in opening remarks.

Earlier, Gen Dunford met with his Chinese counterpart Fang Fenghui, chief of the People’s Liberation Army’s joint staff department, another top general, Fan Changlong, and top foreign policy adviser Yang Jiechi.

Gen Fan told Gen Dunford that Beijing insists military action should be ruled out and “negotiations are the only effective option” in addressing the situation on the Korean Peninsula, according to a statement from China’s defence ministry.

Gen Dunford visited South Korea earlier in the week and flies to Japan on Thursday night. He also told reporters in Beijing that “there’s no question” any potential military action in the Korean Peninsula would be taken only in consultation with South Korea.

Mr Trump tweeted that Kim had “made a very wise and well reasoned decision”, referring to North Korean official media saying the leader would not give an immediate order to launch multiple missiles towards Guam.

“The alternative would have been both catastrophic and unacceptable!” Mr Trump wrote.