David A. Andelman, a contributor to CNN and columnist for USA Today, is the author of "A Shattered Peace: Versailles 1919 and the Price We Pay Today." He formerly served as a foreign correspondent for The New York Times and Paris correspondent for CBS News. Follow him on Twitter @DavidAndelman. This piece has been updated since its original publication. The views expressed in this commentary are his.

(CNN) The US will be doing just the right thing by staying in Afghanistan. We can't get out. Not now, maybe never. The only real question is how deep do we stay and for how long?

We've previously made a similar commitment. The shooting ended in Korea 64 years ago, though since no peace treaty was ever signed, we are still technically at war with North Korea and we still have more than 23,000 troops there.

We might even be fighting a hot war there again before long.

Should we cut and run from Afghanistan?

Our presence in Afghanistan is down to a trickle -- barely 9,800 troops in a nation that has been proven to be no less an existential a threat to the US than North Korea. After all, it was from the mountains of Afghanistan that Osama bin Laden -- hosted by the then-ruling Taliban -- launched his attack against the US on September 11 2001.

Today, bin Laden may be dead, but the Taliban are still poised to return to power if Western troops leave abruptly. Their ally in the region now looks increasingly like ISIS -- or an offshoot.

Moreover, getting out too early risks repeating the same outcome in Iraq, a decision which Donald Trump has criticized his predecessor, President Obama, for taking as far back as the election campaign. There, he pointed out, the reward was the birth and rise of ISIS. Here it could be far worse -- back to the bad old days pre-9/11.

Today, the consequences could be even greater.

JUST WATCHED Blackwater founder's Afghanistan war strategy Replay More Videos ... MUST WATCH Blackwater founder's Afghanistan war strategy 02:24

First, at least two major powers are already dipping their toes into Afghanistan -- Russia and China. Russia has long considered Afghanistan as being in its own back yard. Its interest in Afghanistan dates back to the 19th century and accelerated during the Soviet era, when the Kremlin was anxious to preserve at least a neutral Afghanistan along its southern borders.

That led to a war that lasted nearly the entire decade of the 1980s, a quagmire that was often likened to Russia's Vietnam War. Thousands of young men returning in body bags and a national revulsion in Russia for the Kremlin's obsessions with Afghanistan were important contributors to the end of communism and the breakup of the Soviet Union.

Now, Russia is gradually edging back. A CNN report suggesting that some factions of the Taliban have been receiving arms from Russia -- a dramatic reversal from the 1980s, when it was the CIA supplying arms, including lethal Stinger missiles, to Taliban insurgents battling Russian forces.

JUST WATCHED Afghanistan, US claim Russia arming Taliban Replay More Videos ... MUST WATCH Afghanistan, US claim Russia arming Taliban 02:55

This time, however, Russia is being joined by its newfound ally, China , whose interest in Afghanistan is said to run more to its mineral wealth and where it is most anxious to establish a post-American presence, no matter which government might come to power.

Donald Trump appears to be wise enough to follow the recommendations of his sainted generals and keep -- or even more importantly, enlarge -- America's troop presence there in limited combat, as well as advisory roles, just as we are doing now, to some effect, in Syria.

First, under no circumstances must we tip our hand, as President Obama did in Iraq and again in Afghanistan, and suggest that there's a firm deadline to our presence there.

When Gen. Stanley McChrysta l was in charge of American forces there, Obama gave him some of the 40,000 troops he'd requested, but then brightly observed that they'd all be gone pretty soon.

Guess what? The Taliban simply waited him out. So, did the insurgents in Iraq when Obama set a similar deadline there, and then made good on it.

Now, in Afghanistan, we have a new opportunity not to make the same mistake twice. We must let the bad guys think our presence is forever and that our resources know no bounds. Don't give the bad guys an open-and-shut reason to just wait you out. You need to say one thing and sound like you mean it. We'll stay until the end, no matter how bitter it might be and the bad guys are beaten (just like the US is doing now with ISIS) or until our side in the Afghan stew can really take up the fight and win it.

This time, the stakes could be even higher. Imagine a Taliban back in power in Kabul that decides just the perfect present for their new allies and friends from ISIS -- who helped them return to power -- might be a small nuke that North Korea is willing and may very soon be able, to put on the black market. Then we are talking an existential threat to the American heartland that will make 9/11 seem like a distant memory.

Meanwhile, privatizing the war, like Blackwater and some White House aides would have liked to do, also fails to provide the kind of deep, long-term commitment from the President on down that leads to success. All the bad guys have to do is wait until Blackwater's contract or the money runs out.

What you need to do is tell your generals, sooner rather than later, you want to stay in Afghanistan until victory is won. Then, define what that victory should look like and why it is so deeply important to the world's security.

And, we must enlist or somehow coerce Pakistan, the nuclear-armed neighbor of Afghanistan, that is not in its best interests to assist the Taliban in their murderous campaign.

At the same time, we can't ignore the civil society component. It's certainly not a pretty picture. According to last month's quarterly report to Congress of the Special Inspector General for Afghanistan Reconstruction (SIGAR), Afghanistan's domestic revenues declined some 25% over a year earlier and "covered about 40 percent of total government expenditures."

Moreover, the largest single product of the largest economic sector, agriculture, was the production of opioids, which according to SIGAR nearly doubled to $3.02 billion last year from $1.56 billion a year earlier. We must find a way to build a viable economy independent of the Taliban.

Follow CNN Opinion Join us on Twitter and Facebook

While perhaps overshadowed by Korea, it's still a perfect time to lay all this out for the region and the American people. No more time must be wasted in waffling or debate in Congress over these vital decisions.

Being decisive and making the right choice, as painful as it may appear is the only viable and secure alternative. Any other choice will be far more painful. Not just in the long run, but far more immediately than might ever be imagined. Sometimes, hardball does work.