WASHINGTON — President Donald Trump again raised the prospect of nuclear war with North Korea, boasting in strikingly playground terms on Tuesday night that he commands a “much bigger” and “more powerful” arsenal of devastating weapons than the outlier government in Asia.

“North Korean Leader Kim Jong Un just stated that the ‘Nuclear Button is on his desk at all times,'” Trump wrote on Twitter. “Will someone from his depleted and food starved regime please inform him that I too have a Nuclear Button, but it is a much bigger & more powerful one than his, and my Button works!”

Trump’s combative response to a statement made the day before by Kim raised the temperature in the brewing confrontation between the United States and North Korea even as American allies in South Korea were moving to open talks with Pyongyang. The contrast between Trump’s language and the peace overture by South Korea highlighted the growing rift between two longtime allies.

The president’s tone also generated a mix of scorn and alarm among lawmakers, diplomats and national security experts who called it juvenile and frightening for a president handling a foreign policy challenge with world-wrecking consequences. The language was reminiscent of Trump’s boast during the 2016 presidential campaign that his hands, and by extension his genitals, were in fact big enough.

It came on a day when Trump, back in Washington from his Florida holiday break, effectively opened his new year with a barrage of provocative tweets on a host of issues. He called for an aide to Hillary Clinton to be thrown in jail, threatened to cut off aid to Pakistan and the Palestinians, assailed Democrats over immigration, claimed credit for the fact that no one died in a jet plane crash last year and announced that he would announce his own award next Monday for the most dishonest and corrupt news media.

The North Korea tweet near the end of the day seemed most distressing to some in Washington watching the escalating clash between the United States and a nuclear-armed North.

“I guess the president regards this as a show of strength,” Rep. Jim Himes, D-Conn., a member of the House Intelligence Committee, said on CNN. “But as everybody who’s ever been in a, you know, first-grade playground recognizes, it’s usually the person who’s most aggressively pounding their chest that is in fact the weak one on the playground.”

Eliot A. Cohen, who was counselor to Secretary of State Condoleezza Rice under President George W. Bush, said the tweet demonstrated an immaturity that is dangerous in a commander in chief.

“Spoken like a petulant ten year old,” Cohen wrote on Twitter. “But one with nuclear weapons — for real — at his disposal. How responsible people around him, or supporting him, can dismiss this or laugh it off is beyond me.”

Trump’s supporters brushed off the criticism, calling the president’s words a bracing stand that would force North Korea to confront the potential repercussions of its efforts to develop nuclear weapons that could reach the continental United States.

Michael Flynn Jr., the son of the president’s former national security adviser, Michael T. Flynn, who has pleaded guilty to lying to investigators in the Russia investigation, said Trump’s tweet was “just awesome.” He added on Twitter: “This is why Trump was elected. A no bulls#t leader not afraid to stand up for his country.”

The president’s saber-rattling tweet shifted the tenor of his response to the South Korean initiative just hours after a milder initial statement. Trump, who has disdained the prospects of negotiating with North Korea, said earlier in the day that the possible talks between the two governments on the peninsula resulted from sanctions imposed by the United States and the international community. “Perhaps that is good news, perhaps not - we will see!” he wrote Tuesday morning.

Why Trump hardened his message later the same day was not immediately clear. But he has not hesitated to match North Korea’s incendiary language even as other American presidents resisted such back-and-forth taunting out of concern that it was unwise and unnecessarily rewarding the hermit nation.

Over the summer, Trump vowed to rain down “fire and fury” on North Korea if it posed a threat to the United States. In the fall, he went before the United Nations General Assembly to warn that he would “totally destroy North Korea” if the United States were forced to defend itself or its allies.

Earlier Tuesday, South Korea proposed holding talks with North Korea next week in Panmunjom, a village straddling the border between the two hostile countries. If North Korea agrees, it would be the first official dialogue between the Koreas in two years in what leaders in Seoul hope could dampen the talk of war that has consumed the past few months.

North Korea has made significant strides in the past year in developing intercontinental ballistic missiles that could eventually deliver nuclear warheads to targets as distant as the United States. More than two decades of efforts by the United States and other major powers have failed to thwart North Korea from building a nuclear arsenal in defiance of international law.

Trump has emphasised a more militant line, arguing that his predecessors were too soft in responding to the threat. He has ratcheted up American sanctions and lobbied the United Nations to increase punitive measures, as well. While at various points in the past he has suggested that he would be open to negotiations, he has more often emphasised lately that he did not believe talks would lead to a fruitful outcome. On more than one occasion when his secretary of state, Rex W. Tillerson, publicly broached the possibility, Trump pulled him back, declaring, at one point, that talks would be a waste of time.

Many security experts have said there is no reasonable military option for restraining North Korea that would not involve unacceptable loss of life, which is one reason South Korea’s president, Moon Jae-in, is more eager for dialogue. But Trump and his national security adviser, Lt. Gen. H.R. McMaster, have argued that there is a viable military alternative.

Peter Baker and Michael Tackett/The New York Times. Eileen Sullivan contributed reporting.