U.S. Ambassador to the United Nations Nikki Haley speaks during a briefing at the White House on April 24. (Brendan Smialowski/Agence France-Presse via Getty Images)

While in Paris last week, President Trump praised the liberation of Mosul while blaming the Obama administration for allowing the Islamic State to run amok in Iraq in 2014. But Trump’s administration is repeating mistakes of the past on counterterrorism, neglecting the long game and increasing the likelihood that the terrorists will be back.

“Now we must work with the government of Iraq and our partners and allies in the region to consolidate the gains and to ensure that the victory stays a victory, unlike the last time,” Trump said.

While he was making those remarks, a senior U.N. official was shaking a cup around Washington, explaining to lawmakers and administration officials that if urgent humanitarian relief funds were not forthcoming, hundreds of thousands of Iraqis who fled Mosul during the fighting would soon lack basic necessities.

Bruno Geddo, the Iraq representative for the U.N. High Commissioner for Refugees (UNHCR), told me that the gains achieved militarily in Mosul, at great human and financial cost, could be squandered if the international community fumbles the next stage — stabilization and reconstruction.

“The stakes are higher than just shelter, food and water,” he said. “We think Iraq is at a crucial stage. It’s a turning point, and we want to make sure we do everything we can to make sure it turns to a better future.”

More than 900,000 Iraqis fled the city, with more than 700,000 yet to return, but only 21 percent of UNHCR’s Iraq budget for this year has been funded, Geddo said. Unless the organization gets $126 million in the next two months, it will be forced to scale back crucial humanitarian services. The United States covers about a quarter of UNHCR’s Iraq program.

If humanitarian assistance is cut off, the largely Sunni population in northern Iraq could feel abandoned and turn back to the extremists, Geddo said. That, of course, is what happened about a decade ago. “Hopefully this time around, a lesson will have been learned,” he said.

The Trump administration doesn’t seem to have learned that lesson. For example, the United States doesn’t have a well-developed plan to help rebuild the cities in Iraq and Syria damaged during the fight, said former White House counterterrorism adviser Richard Clarke.

“The best breeding ground for terrorists is a city without services,” he said. “The short-termism in our counterterrorism policy is baffling, because we will have to come back and do it all again.”

Trump’s budget shows a clear disdain for programs focused on preventing wars or keeping finished wars finished. The State Department’s spending request would slash programs that build capacity in partner countries for fighting terrorism and cut funding for all manner of U.N. activities. After cutting $600 million from the U.N.’s peacekeeping budget, U.N. Ambassador Nikki Haley boasted, “We’re only getting started.”

In Syria, the current strategy is to partner with Russia to establish deconfliction zones and temporary cease-fires that Trump often praises. But partnering with Russia in Syria without a better plan to help liberated areas prosper could lead to disaster. The Assad regime and its partners could expand their control of Sunni Arab regions, exacerbating grievances that led to the rise of extremism there in the first place.

The United States must do more to help local Sunni governance take hold, not hand over Sunni land to the regime, said Charles Lister of the Middle East Institute. “We need to continue to invest in these communities.”

The shortsighted nature of U.S. strategy is not limited to the Middle East; counterterrorism policies at home are similarly out of balance.

The Trump administration is focused on tightening immigration from several Muslim-majority countries and boosting spending on border defenses. But most recent terrorist attacks on U.S. soil were committed by people long inside the country.

Yet Trump’s Department of Homeland Security budget would cut programs that help prevent or minimize the damage from domestic terrorist attacks, including funding for Federal Emergency Management Agency first responders and programs that engage Muslim communities inside the United States.

The administration is focused on borders but not paying enough attention “to what we are doing inside our borders to defend the country” from terrorism, said Rand Beers, former deputy homeland security secretary.

Terrorism isn’t a root cause; it’s a symptom of wider problems faced by disenfranchised populations in the Middle East and at home. The Trump administration’s penny-wise, pound-foolish approach addresses the symptoms while leaving the causes in place.

Read more from Josh Rogin’s archive, follow him on Twitter or subscribe to his updates on Facebook.