WASHINGTON — U.S. President Donald Trump is pushing back on his top national security advisers’ assessments of the threats posed by the North Korea, the Islamic State group and Iran.

The president’s foreign policy tweetstorm Wednesday morning comes a day after U.S. intelligence agencies told Congress that North Korea is unlikely to dismantle its nuclear arsenal, that ISIS remains a threat and that the Iran nuclear deal is working. They did not mention the crisis at the U.S.-Mexican border for which Trump has considered declaring a national emergency.

“North Korea relationship is best it has ever been with U.S.,” Trump said on Twitter, pointing to a halt in nuclear and missile tests by North Korea, the return of some U.S. service members’ remains, and the release of Americans once detained there as signs of progress.

“Decent chance of Denuclearization,” he added.

Trump’s assessment contrasts with Director of National Intelligence Dan Coats, who told the Senate Select Committee on Intelligence that North Korean leader Kim Jong Un will seek to retain its nuclear weapons and production capabilities because he views them as critical to regime survival.

Kim committed to denuclearization after meeting with Trump last year. A second Trump-Kim meeting is expected in February.

The “Worldwide Threat Assessment” report, on which Coats based his testimony, said Kim’s support at his June 2018 Singapore summit with Trump for “complete denuclearization of the Korean Peninsula” is a formulation linked to an end to American military deployments and exercises involving nuclear weapons.

The president’s comments drew rebukes from the ranking Democrats on the Senate and House intel panels, Sen. Mark Warner, D-Va., and Rep. Adam Schiff, D-Calif, respectively.

“The President has a dangerous habit of undermining the intelligence community to fit his alternate reality,” Warner said in a tweet. “People risk their lives for the intelligence he just tosses aside on Twitter.”

Said Schiff: “It is a credit to our intelligence agencies that they continue to provide rigorous and realistic analyses of the threats we face. It’s deeply dangerous that the White House isn’t listening.”

On the Middle East, where the intelligence assessment undercut Trump’s rationale for his order of a full withdrawal of U.S. troops, the president pushed back again, saying ISIS “will soon be destroyed, unthinkable two years ago.” The militant group, he said, was “running rampant” when he became president, but there’s since been “tremendous progress … especially over the last five weeks.”

That’s out of sync with the intelligence assessment that ISIS “remains a terrorist and insurgent threat” inside Iraq, where the government faces “an increasingly disenchanted public.”

CIA Director Gina Haspel said ISIS is “still dangerous” and that it commands “thousands of fighters in Iraq and Syria.”

On Iran, Trump said Tehran has curtailed its troublemaking in the Mideast since he withdrew the U.S. in 2018 from the nuclear deal Iran reached with the U.S. and other Western nations. Still, he called Tehran “a source of potential danger and conflict.”

“The Intelligence people seem to be extremely passive and naive when it comes to the dangers of Iran. They are wrong!” Trump tweeted. “Be careful of Iran. Perhaps Intelligence should go back to school!”

Coats did say Iran continues to pose a long-term threat. He pointed to its support for Houthi rebels in the Yemen civil war, its support to Iraqi Shia militants, and its efforts to consolidate its influence in Syria and arm Hezbollah — which have in turn prompted Israeli airstrikes.

When Trump withdrew the U.S. from the deal, he called it a terrible deal that would not stop Iran from going nuclear.

The intelligence agencies said that while Iran is looking at ways to escape the terms of the agreement, it continues to work with other parties to remain in compliance, at least temporarily. That in turn has lessened the nuclear threat from Iran, they said.