SEOUL, South Korea — Gen. Joseph Dunford said he has advised U.S. leadership not to “dial back” joint war games with South Korea that are due to begin next week despite threats from North Korea.

The comments came Thursday as the chairman of the Joint Chiefs of Staff visits China amid rising tensions over the North’s nuclear weapons progress.

South Korean President Moon Jae-in also vowed Thursday not to allow another war on the peninsula, and President Donald Trump has promised to get permission from Seoul for any military action against the North.

The 10-day command post exercise known as Ulchi Freedom Guardian is to begin Monday and will involve tens of thousands of U.S. and South Korean servicemembers.

The mainly computer-simulated drills and other joint exercises always infuriate Pyongyang, which considers them rehearsals for an invasion despite U.S. insistence that they’re defensive in nature.

That has heightened fears that this year’s UFG exercise may spark a new crisis after North Korean leader Kim Jong Un left open a threat to fire missiles into waters near Guam, saying he would hold off for now while monitoring U.S. behavior.

Dunford, speaking to reporters in Beijing, said a military solution to the growing threat from the North would be “horrific” but “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."

He said the military was developing “credible, viable military options” upon orders from Trump.

The annual war games are key to maintaining readiness and alliance defense capabilities and are not on the negotiating table “at any level,” he added, according to Reuters.

“My advice to our leadership is that we not dial back our exercises,” he said. “As long as the threat in North Korea exists, we need to maintain a high state of readiness to respond to that threat.”

Dunford was responding to questions about comments by Trump's chief strategist Steve Bannon, who was quoted in an interview with The American Prospect as saying “there’s no military solution” to the North Korean problem.

Moon, meanwhile, vowed not to allow a new war on the peninsula, which was devastated by the 1950-53 war, which ended in an armistice instead of a peace treaty.

The United States — which backed Seoul in the war against the Chinese and Soviet-backed North — maintains about 28,500 servicemembers in South Korea.

“The people worked together to rebuild the country from the Korean War and we cannot lose everything again because of a war,” Moon said during a televised news conference to mark his first 100 days in office. “I say with confidence that there will never be another war on the Korean Peninsula.”

The liberal leader has been largely sidelined in recent weeks as Trump and the North engaged in a war of words. All sides moved to tamp down tensions this week and signaled they may be willing to move toward negotiations.

“Kim Jong Un of North Korea made a very wise and well reasoned decision. The alternative would have been both catastrophic and unacceptable!” Trump tweeted on Wednesday.

Trump’s administration has consistently said military action is on the table and the president has even suggested he’s willing to take unilateral action against Pyongyang if it continues to threaten the United States.

Moon, who took office on May 10 after a snap election after the ouster of his conservative predecessor over a corruption and influence-peddling scandal, said Seoul is in close communication with Washington over the North Korean problem.

“The U.S. sought to put maximum pressure and sanctions through the latest U.N. Security Council resolution,” the South Korean leader said.

He also suggested recent bellicose rhetoric from Trump, which included a threat to unleash “fire and fury” on the North, was meant to increase pressure on the defiant North and not a signal of military action.

“At the same time, it is seeking its own sanctions, and I believe President Trump sought to pressure North Korea by showing a firm determination. I do not necessarily believe that showed his determination to take military actions,” he added.

Moon also insisted that “any military action to be taken on the Korean Peninsula requires South Korea’s consent unless it is taken outside the peninsula.”

“Also, even if the United States takes military action outside the peninsula, I am confident it will sufficiently consult with South Korea in advance if such action may increase tension between the South and the North,” he said.

Dunford agreed in his remarks in Beijing.

“Any military action that would be taken on the Korean peninsula would be in consultation with our allies, there’s no question about that,” he said.

Moon said he believes the two Koreas must restart a dialogue, but it will take time. He urged the North to halt its efforts to develop a nuclear-tipped weapon that could reach the U.S. mainland.

U.S. officials and experts say the North has demonstrated major progress toward that goal with dozens of missile tests, including two ICBM launches last month. It also conducted two underground nuclear tests in 2016.

“I would consider that North Korea is crossing a red line if it launches an intercontinental ballistic missile again and weaponizes it by putting a nuclear warhead on top of the missile,” Moon said.