SEOUL, South Korea — With his public alarmed by President Trump’s recent threats to North Korea, President Moon Jae-in of South Korea issued an unusually blunt rebuke to the United States on Tuesday, warning that any unilateral military action against the North over its nuclear weapons program would be intolerable.

“No one should be allowed to decide on a military action on the Korean Peninsula without South Korean agreement,” Mr. Moon said in a nationally televised speech.

As a candidate for the presidency, Mr. Moon, a liberal who took office in May, said he would “say no to the Americans” if necessary. But he has aligned South Korea more closely with its military ally than many had expected. Though he suspended the deployment of a United States missile defense system opposed by China, he reversed that decision last month after North Korea tested two intercontinental ballistic missiles.