During his February 28, 2017, address to a joint session of Congress, U.S. President Donald Trump vowed to “demolish and destroy” terrorist groups such as the Islamic State (also known as ISIS). Although most U.S. media coverage has focused on U.S. operations in Syria and Iraq, Afghanistan remains an important frontline state in the struggle against terrorism. At present, there are more U.S. military forces deployed there than to any other active combat zone, and a panoply of Islamist extremist groups—from the Taliban to al Qaeda and ISIS—remain in the country and in neighboring states such as Pakistan.

This reality makes it important for the Trump administration to avoid some past U.S. missteps, such as, especially, publicizing a fixed set of deadlines to withdraw U.S. forces. Instead, the United States should retain a small military force in the country at or slightly above the current level of 8,400 U.S. soldiers, along with its current diplomatic, intelligence, and development footprint.

Washington's goals should be limited: aggressively pursue terrorists that threaten the United States, prevent Taliban forces from overthrowing the Afghan government, and encourage a more sustainable and effective Afghan government. A small but durable U.S. military presence would have an additional benefit: it would likely dampen security competition between nuclear-armed regional powers, which would almost certainly intensify with a U.S. departure.

In some ways, Trump inherits a more challenging situation in Afghanistan than his predecessor did. In 2016, the Taliban slightly increased its control of territory in rural areas of Afghanistan's east and north, though the Taliban does not control any cities. The Taliban's leadership still enjoys a sanctuary in neighboring Pakistan, where it oversees the insurgency. Several other countries, including Iran and Russia, have also stepped up communication with, and provided limited material support to, the Taliban.

In addition, Afghanistan's national unity government remains weak and hamstrung by corruption, though the non-governmental organization Transparency International recently praised Afghanistan's national procurement reform as a “bright spot” in the country's fight against corruption.

The Trump administration faces several difficult questions ahead. How important Afghanistan is to U.S. national security interests, what U.S. primary objectives should be in Afghanistan, whether it should opt to keep forces in the country, and what role the administration should encourage Afghanistan's neighbors, particularly Pakistan, to play will all be on Trump's agenda.

The Problem with Departure Deadlines

The United States has important national interests at stake in the region, especially concerning terrorism. Afghanistan remains a haven for extremist groups. The Taliban poses a major threat to the Afghan government and is poised to step up its insurgent campaign in 2017. The war in Afghanistan continues to attract terrorist groups that threaten the United States and its allies, such as al Qaeda's local branch, al Qaeda in the Indian Subcontinent; ISIS's local province, ISIS-Khorasan Province; and other groups such as Lashkar-e-Taiba and Tehreek-e-Taliban Pakistan.

Washington also has an interest in preventing a major escalation in great power conflict in the region, particularly between nuclear-armed Pakistan and India. Those two countries are engaged in a proxy war in Afghanistan, with New Delhi aiding the Afghan government and Islamabad abetting some insurgent groups.

Given the complexity of the situation, publicly announcing exit plans would be a bad idea.

Given the complexity of the situation, publicly announcing exit plans would be a bad idea. After coming to office, U.S. President Barack Obama promised to end his country's military involvement in the Afghan war. In December 2009, he declared at West Point that, although the United States would be sending an additional 30,000 troops to Afghanistan in the short term, he would start to withdraw soldiers in 2011.

At the end of 2014, Obama remarked that “our combat mission in Afghanistan is ending, and the longest war in American history is coming to a responsible conclusion.” But the Taliban-led insurgency worsened and ISIS co-opted local militants and joined the fight.

Although Washington's deadlines to withdraw U.S. forces and “end” the war in Afghanistan were motivated, in part, by a laudable desire to encourage Afghans to take the lead in combat operations in a country that many U.S. officials believed was not critical to U.S. national security, the departure timelines had significant costs.

First, they signaled that the U.S. commitment was waning. Washington's promise to leave evoked stark memories of the U.S. abandonment of Afghanistan in the early 1990s after having supported anti-Soviet forces since the late 1970s. Following the Red Army withdrawal, the United States lost interest and stopped providing military and economic assistance to Afghan opposition groups. Afghanistan deteriorated into a bloody civil war, which led to the rise of the Taliban and allowed al Qaeda to establish a sanctuary to plan the 9/11 attacks.

Second, the U.S. deadlines gave Afghanistan's neighbors, including Pakistan, an incentive to plan for the day after the United States left. Pakistani government officials, including from the country's chief intelligence agency, the Directorate for Inter-Services Intelligence (ISI), continue to provide sanctuary to the Taliban and some assistance to Taliban leaders in hopes of shaping the region after the U.S. withdrawal.

Third, the U.S. promises of departure undermined the prospects for peace. The Taliban had little incentive to reach a peace settlement because its battlefield prospects and bargaining position were likely to improve once U.S. forces withdrew. Today, the possibility of a small but durable U.S. military, diplomatic, and intelligence presence provides an important opportunity to reshape U.S. policy in Afghanistan and toward the region.

A Realistic Set of Goals

Based on its interests, the United States' primary objectives should be to prevent the Taliban from overthrowing the Afghan government, to target terrorist and insurgent groups that threaten the United States and its core interests, and to improve the capacity of the Afghan government and local allies as much as is feasible.

Washington should set a more realistic goal: to ensure that the Taliban doesn't win.

These objectives are and should remain limited. The Afghan government is weak and poorly functioning—and is likely to continue to be so for the foreseeable future. The United States should thus not expect the Afghan government to defeat the Taliban on the battlefield over the next four years of the administration. Instead, Washington should set a more realistic goal: to ensure that the Taliban doesn't win. In order to do this, Washington could take several steps.

First, U.S. diplomats need to continue encouraging governance reform in the country, including helping organize transparent elections and undermining large-scale public corruption. U.S. policymakers should also encourage diplomatic reconciliation with the Taliban. Since World War II, there have been roughly 181 insurgencies. Nearly three-quarters have been won on the battlefield. But of the roughly 30 percent that ended in a draw, most settled into a stalemate where neither side assessed that it could win. The Afghan war is at—or close to—a stalemate now. So negotiations may be the most likely path toward ending the violence given the inability of either side to win.

Second, the United States should continue to keep at least the current number of 8,400 forces in Afghanistan, although more non-combat troops could be useful for advising Afghan army forces below the corps level. John Nicholson, the U.S. commander in Afghanistan, has requested several thousand additional troops from the United States and partner nations to train and advise Afghan forces—what some U.S. commanders have referred to as “thickening” advisory efforts. This is a reasonable request, although it is unlikely to break the stalemate.

What Pakistan Fears

An enduring U.S. commitment to Afghanistan would send a strong signal to Pakistan and other neighbors that they do not need to prepare for a post-American region. With a long-term U.S. commitment, Washington and Islamabad can focus on building a more constructive and enduring political, economic, and security relationship. Washington should also consider encouraging a more active Saudi role in cajoling Pakistan to jump-start peace negotiations with the Taliban.

The United States should also commit to aggressively pursuing its enemies wherever it finds them in the region. Unless or until Pakistan changes its strategic calculus, the United States should be prepared to target al Qaeda, ISIS, the Taliban, and other groups—including on Pakistani soil. In May 2016, a U.S. drone killed Taliban leader Akhtar Muhammad Mansour in Baluchistan, Pakistan.

Trump should make Afghanistan and neighboring Pakistan an important and enduring part of the struggle against ISIS.

Of all the countries in which the United States is militarily engaged against Islamist extremists, Afghanistan is one of the few in which the local government has welcomed U.S. armed forces. This reality does not diminish the importance of Iraq, Libya, Syria, and other frontline states battling terrorist groups. But it does mean that Trump should make Afghanistan and neighboring Pakistan an important and enduring part of the struggle against ISIS and other extremists.

With terrorist groups operating in Afghanistan, the Trump administration should aim to prevent the Taliban from winning, pursue political reconciliation where feasible, and target terrorist groups that threaten the United States. These are limited objectives. The major alternative—U.S. withdrawal from the region—would likely lead to a collapsing government in Kabul, a growing terrorism problem, and intensified security competition between regional nuclear-armed powers. That would be in no one's interest.

Seth G. Jones is Director of the International Security and Defense Policy at RAND, an adjunct professor at Johns Hopkins University's School for Advanced International Studies, and author, most recently, of Waging Insurgent Warfare: Lessons from the Vietcong to the Islamic State (Oxford).

This commentary originally appeared on Foreign Affairs on March 21, 2017. Commentary gives RAND researchers a platform to convey insights based on their professional expertise and often on their peer-reviewed research and analysis.