Incredibly, even though much U.S. blood and treasure was sacrificed in Afghanistan, we won’t bomb the militants trying to take over the country.

In any counterinsurgency campaign, foreign forces helping another country must strike a balance. They must wean local forces off their dependency on outside help as rapidly as possible. But they also must not rush the job and lose what has been gained along the way—especially when a part of their core mission is to build up the indigenous police and military forces to which they seek to pass the baton.

For 10 years U.S. leaders have understood the need for this delicate balancing act in Iraq and Afghanistan, though both the Bush and Obama administrations did, in certain cases, hand off to indigenous forces and draw down more rapidly than was advisable. We are at risk of doing that again now in Afghanistan.

The immediate issue is how we are using American and broader NATO air power. There is a great deal of it—many dozens of combat aircraft at bases from Helmand and Kandahar provinces in the south to the cities of Khost and Jalalabad in the east to the capital region of Kabul and points north. But we continue to handcuff those deploying these jets, helicopters and unmanned aerial vehicles. Existing U.S. and NATO policy generally allows them to strike targets on the ground only when hostile forces can be identified as al Qaeda or ISIS loyalists, when they pose an imminent threat to NATO personnel, or, reportedly, when a strategic collapse is imminent.

The rules of engagement mean that the indigenous Afghan and Pakistani Taliban generally get a pass. Yet it was the Taliban that allowed al Qaeda the sanctuary in Afghanistan in which the 9/11 attacks were planned, and which presumably would make the Taliban a legitimate target under the 2001 Authorization for Use of Military Force.

And it is the Taliban that now seek to overthrow the unity government of President Ashraf Ghani and Chief Executive Abdullah Abdullah. They seek as well to jettison the progress in education and human rights that has been achieved since 2001. The Taliban also aim to cut off the cooperation with the international community that Afghanistan still so badly needs to recover from a generation of war.

This is the same group that also enjoys the sworn support of al Qaeda’s senior leadership—following al Qaeda leader Ayman al Zawahiri’s endorsement of the new head of the Afghan Taliban, Mullah Akhtar Mansour. And it is the same quasi-terrorist movement that, in alliance with the Haqqani network based in Pakistan, has recently carried out the horrific bombings in Kabul.

The Taliban have taken back large swaths of Helmand province and areas in eastern provinces such as Nangarhar and Kunar over the past several years. This happened after the sizable NATO troop drawdown that began in 2011 and that, by last year, had reduced the alliance’s strength in Afghanistan by some 90% relative to its peak. (Total foreign forces peaked at around 150,000 uniformed personnel in early 2011 and are now down to about 15,000.) The Taliban also seized the northern city of Kunduz, Afghanistan’s fifth largest, for a stretch last fall and may attempt a similar endeavor this year.

Yet the Taliban are not invincible. Though they took Kunduz, they were soon driven out by an Afghan-led operation. They do not hold any other major cities or major transportation arteries, though security on the “ring road” that connects the country’s major cities is again tenuous. The Taliban are broadly despised by the majority of the Afghan people. Without the sanctuaries they enjoy in Pakistan, it is doubtful that they could mount an organized threat to the country, even if they remained—in cahoots with drug dealers and other criminals—a threat to individual communities and citizens.

In other words, we have a real fight on our hands in Afghanistan, but not a hopeless one. And in this context, even modest U.S. and NATO military contributions have the potential to make a considerable difference.

Which brings us to the Obama administration’s policy that seeks to minimize U.S. and allied involvement in the war. Per this policy, NATO aircraft dropped only about 1,000 bombs in Afghanistan in 2015, very few against the Taliban. That was a fivefold reduction from the war’s peak level of activity. So far, 2016 looks similar, with 300 bombs dropped in the first three months.

These figures stand in contrast to what we are doing in Iraq and Syria. According to Pentagon data, we dropped 6,000 bombs there in 2014, almost 30,000 in 2015, and almost 7,000 in the first three months of this year. Modern air power—when combined with a suitable ally on the ground that can seize the advantage created by the bombing of enemy positions, camps and supply routes—is impressive. ISIS has lost about 40% of the territory it once held in Iraq and Syria and stands to lose more.

By contrast, while exact figures are hard to come by, a reasonable unclassified estimate is that the Taliban now hold 5% to 10% more of Afghanistan—as measured by the population under their influence—than they did a few years ago before the drawdown of allied forces. Civilian fatalities from the continuing war in Afghanistan, while still far less than in many battle zones (including Iraq and Syria), have been moving upward as well.

Some might reasonably ask, after 15 years of war in Afghanistan, why do we need to keep at it? The answer is simple—because Afghanistan, effectively the eastern bulwark in our broader Middle East fight against extremist forces, still matters. We went there to take away from al Qaeda the sanctuary in which the 9/11 attacks were planned. We have stayed to ensure that this remains the case.

And we also must remain for now to deny sanctuary to the nascent ISIS force in eastern Afghanistan. U.S. forces in-country today are far smaller than they were before, our casualties are relatively few, and the burden on our nation’s military as well as its checkbook is far less than it once was. But that doesn’t mean that we should allow the Taliban to regroup and turn back the clock on the progress.

When the international effort in Afghanistan began after 9/11, that country had been decimated by a generation of warfare in which we helped brave local fighters defeat the Soviet Union, only to see America and other Western powers desert the nation once Soviet forces were defeated and withdrawn. Thus, it is no surprise that the country, always poor and struggling even in the best of circumstances, will need more time to recover.

Bear in mind as well that for the first seven or eight years of this fight, we devoted very few American resources to the problem, even though Afghanistan didn’t have a sizable army or police force of its own. We only began to build up the Afghan air force seriously in the last two years or so.

This is because forging a viable Afghan army and police force were the more urgent tasks for the NATO mission once we finally did devote substantial resources to the fight, including at the time one of us commanded that operation in 2010-11. It will take perhaps two more years for the Afghan air force, still training pilots and still receiving aircraft, to reach its intended strength.

The bottom line is simple: While we also need to keep a focus on whether U.S. and NATO forces are adequate in size for the current mission, we need to take the gloves off those forces already in-country. Air power in particular represents an asymmetric Western advantage, relatively safe to apply, and very effective against massed (or even individual) enemy forces and assets.

Simply waging the Afghanistan air-power campaign with the vigor we are employing in Iraq and Syria—even dropping bombs at a fraction of the pace at which we are conducting attacks in those Arab states—will very likely make much of the difference between some version of victory and defeat.

Mr. Petraeus, a retired Army general, commanded coalition forces in Iraq (2007-08) and in Afghanistan (2010-11) and later served as director of the CIA (2011-12). Mr. O’Hanlon is a senior fellow at the Brookings Institution and director of research in its Foreign Policy program.