This week, the Trump administration announced that by Jan. 15, the number of American troops in Afghanistan would be cut from around 5,000 to around 2,500; and from around 3,000 to around 2,500 in Iraq. The move brings President Trump closer to realizing his oft-stated goal of withdrawing the United States from “endless wars.”

The pullout coincides with the Pentagon doing away with several specialized, in-house research programs established to analyze the kind of warfare the U.S. has fought in recent years — in dense urban environments, using hybrid tactics in non-Western countries with cultures different from our own. The motivation for cutting these programs is ostensibly to redirect costs and to shift the military’s focus from fighting the asymmetric wars of the recent past to large-scale combat operations against militarily powerful potential future adversaries such as China or Russia.

But it’s a shortsighted decision. It amounts to erasing the lessons of two decades of tactics, training and doctrine painfully learned from fighting in Iraq, Afghanistan, Syria and elsewhere. Any cost savings likely isn’t worthwhile — a drop in the bucket of the Pentagon’s roughly $700 billion budget — while the decision belies how future wars, even large-scale wars, would likely be fought. In a protracted large-scale conflict, it is almost inevitable that the great military powers would employ some mix of irregular warfare tactics with more regular tactics and exploit urban terrain to wage future combat.

A case in point is the recent decision to shut down a little-known but influential outfit called the Asymmetric Warfare Group (AWG). The group comprised a small cadre of senior and mid-level officers, many with advanced degrees, formed at the height of the Iraq War to better understand ongoing U.S. wars and enemies. Deployed to hot spots around the world, the group was the Army’s combat problem-solvers.

It churned out guidance on a range of real-time issues, from countering insider attacks against American troops, including those involving Afghan soldiers-turned-Taliban sympathizers, to addressing the battlefield threat of improved explosive devices, known as IEDs. Their reports were must-reads in the highest echelons of the Pentagon but also informed military instruction taught at the service academies.

By closing this shop, the military also loses vital sets of ears and eyes in modern combat settings, along with an internal source for dispassionate analysis of military effectiveness. Paradoxically, it was the AWG’s observations of the tactics used in Russia’s incursions into Crimea and Ukraine that helped accelerate the military’s recent shift toward a focus on great-power competition.

The Army also closed its University of Foreign Military and Cultural Studies, a small school at Fort Leavenworth, Kan., where students have been trained as “red teamers” who study interdisciplinary texts, in fields such as cognitive psychology, to inform innovative decision-making. The mission of the institution was to combat groupthink, something commonplace within large institutions such as the U.S. military. As Forbes reports, the red-teaming approach contributed to the thinking behind the Iraq War “surge” and the raid to kill Osama bin Laden.

The Marine Corps recently closed its urban warfare experiment called Project Metropolis. The project was meant to transform how Marines train for fighting in dense urban or subterranean settings. A 2016 report found that Marines weren’t adequately trained or equipped to fight in complex environments, including cities. This might include knowing how to enter a building without destroying it, especially one next to a school or hospital.

It might also include integration of drone technology into their training to avoid what’s known as cognitive overload — when too many tasks lead to inability to process information. The objective was to avoid what happened in Fallujah in 2004; finding ways to attack a city without destroying it and losing local support. The closure reflects the Marines’ shift to focus on littoral and naval operations in the Pacific region.

Such closings, on their own, won’t magically put an end to the American habit of saying “never again,” only to find ourselves once again fighting asymmetric wars without clear front lines and well-defined enemies. After the Vietnam War, the military reconfigured to confront the Soviet Union. It did so by shifting to an all-volunteer force and investing in “combined arms” and precision-strike capabilities. But the military never fully learned from its Vietnam-era mistakes or developed a comprehensive counterinsurgency doctrine, and then found itself struggling to effectively fight insurgencies in Afghanistan and Iraq in the 2000s.

China’s rise, coupled with its additional investments in military hardware, and Russia’s efforts to reassert itself militarily in Ukraine, Syria and elsewhere, have prompted similar failures of long-range strategic thinking at the Pentagon. Concerns about future conflict with China or Russia are legitimate. But the shift in priorities has caused a scramble to prematurely divert attention from asymmetric wars still ongoing, of the recent past or, possibly, of the future. There appears to be a broad assumption that the U.S. will never have to stop an insurgency, wage a remote proxy war or contribute to retaking a city like Mosul again, so why not — the thinking goes — de-emphasize these capabilities and retool instead to fight a conventional war?

The U.S. could, indeed, one day get roped into a conflict between China and Taiwan. However remote, there is also the possibility of a land war between NATO and Russia in the Baltics. But despite any great-power competition that U.S. planners may envision, even these scenarios are likely to have a component of irregular, asymmetric warfare concentrated in urban centers, with some of the contours more like the conditions in Iraq and Afghanistan than the scenarios familiar from World War II, with huge deployments of conventional forces squaring off across open fields or large oceans.

The next administration may finish what Trump started and pull all but a token force from Iraq and Afghanistan, as resources shift toward great-power competition, and the public’s appetite for Middle East and Central Asian deployments wanes. But we lose the institutional knowledge from those wars at our peril. If we forget lessons learned over the last two decades, we may be doomed to relearn them.