MOSCOW — A surge of fighting in northern Afghanistan has the country’s Central Asian neighbors scrambling to prevent the conflict spilling across the borders as the withdrawal of U.S. troops moves into its final stages. Russia, too, is watching with alarm in a region Moscow considers part of its sphere of influence.

At least 1,500 soldiers of the Afghan army — which the United States spent billions of dollars training over nearly two decades — have fled across the border into Tajikistan to escape Taliban advances. The Afghan soldiers were flown back to Kabul, according to Afghan officials.

More than 1,000 refugees, mainly women and children, also crossed into Tajikistan and officials fear more could flood across the border. Uzbekistan, which also borders Afghanistan, has set up a tent city outside the city of Termez in anticipation of refugees, Eurasianet reported, citing local residents.

Meanwhile, video showed Taliban fighters controlling the main border bridge across the Pyanj River at Sher Khan Bandar, linking Afghanistan with Tajikistan, netting the group valuable customs revenue. The $37 million U.S.-funded bridge, opened in 2007, is the main northern Afghanistan gateway for truck freight.