Next month, Donald Trump will inherit the nation’s longest war – the war in Afghanistan. More than 8,000 United States troops remain there, 15 years on, primarily to support Afghan forces in their battle against the Taliban, while the Islamic State, or ISIS, has also gained a foothold.

For a president-elect who abhors nation-building – and castigated President Obama for prematurely pulling out of Iraq – Afghanistan presents few good options.

Peace talks with the Taliban, hosted by Pakistan, have gone nowhere. Afghan troops are more effective, but still reliant on US air power. The Taliban’s territorial control is at its greatest extent since it lost power in 2001.

One wild card is Russia. This week Russia hosted talks on Afghanistan’s security with Pakistani and Chinese envoys, the third such meeting and a sign, say analysts, of rising Russian concern over instability and Islamic extremism on the borders of its sphere of influence.

Could Moscow be a useful partner in Afghanistan? Or will it only add to the regional rivalries that perpetuate the conflict?

On one hand, Afghanistan is not Syria. There, Russia supports a regime that the US opposes. In Afghanistan, both powers want to see the Kabul government deny sanctuary to ISIS and Al Qaeda. That could present a common agenda.

“The Russians have been content to see the US tied down in Afghanistan and watch from afar. Now ISIS is making inroads in Afghanistan ... I think Russia is starting to get worried,” says Lisa Curtis, an expert on South Asia at the Heritage Foundation, a conservative think tank.

But Russia, which still bears the memory of the disastrous 1979 Soviet invasion, has a narrower agenda than the US has had in Afghanistan.

“Russia’s interests are not so much in Afghanistan itself but in preventing any instability spilling over into Central Asia,” says Paul Stronksi, a senior fellow at the Carnegie Endowment for International Peace

Russia’s pursuit of that agenda has made its role hard to pin down. For instance, Russia has warned that ISIS fighters from Syria are flowing into Afghanistan, giving them a rear base to attack Russia. In response, it is deepening its ties to the Taliban, seeking to root out ISIS from its Afghan sanctuaries, say analysts.

That could be useful for brokering political talks with Kabul – a US goal. But any material support for the Taliban would undermine US efforts to build Afghan forces capable of defeating all militants. Russia has denied helping the Taliban and said its goal is to promote peace talks.

“What we see from Moscow is a short-term tactical approach that could backfire on them,” says Ms. Curtis, a former US diplomat and adviser to the State Department.

Russia’s diplomacy has also raised hackles in Kabul. The Afghan government complained this week that it had been excluded from the Moscow talks. In a joint statement, China, Pakistan, and Russia said they would invite Afghanistan to the next meeting.

They also said that China and Russia would work with the United Nations to promote peace talks by removing Afghans from sanctions lists, a reference to Taliban leaders who are barred from international travel.

As a candidate, Mr. Trump gave few clues about his views on Afghanistan, a war that had largely fallen from public view. Given his claims that Mr. Obama “founded” ISIS because he yanked US troops from Iraq, US military deployment in Afghanistan is unlikely to end anytime soon, say analysts.

Trump might want to step up the pace of counterterrorism missions, in addition to the training and support for Afghan troops, says Curtis. “It’s safe to assume we’ll remain engaged in Afghanistan.”

One difference between Iraq and Afghanistan, says Lawrence Korb, a senior fellow at the left-leaning Center for American Progress, is that political leaders in Afghanistan want US troops there, unlike former Iraqi Prime Minister Nouri al-Maliki.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Mr. Korb says he expects Trump to continue a policy of trying to nudge the warring parties toward negotiations while supporting Afghan military and civilian forces – roughly in line with Obama's current policy.

“We’re in a situation where the costs are relatively low. We may not be winning but we’re not losing dramatically, and the hope is that we could get some sort of settlement,” he says.