As the U.S. seeks an exit from the Afghan war, Central Asia is on the cusp of a new era, with Russia and China vying for influence in a region that will no longer be dominated by America’s post-9/11 undertaking to bring peace and stability to Afghanistan.

The two countries are wary of Islamist militancy, both on their soil and spilling over from Afghanistan, while China wants to safeguard the billions of dollars its companies have invested in the region under President Xi Jinping’s Belt-and-Road Initiative, according to regional...