RUZVAT, Tajikistan -- In many places along Tajikistan's border with Afghanistan, the countries are separated by just a few yards of water -- the narrow Panj River.
There are no walls or fences, and, standing on the Tajikistan side, northern Afghanistan is so close that as ABC reporters looked across last week, Taliban fighters waved back at them.
The Taliban have taken control of the Afghan side of the border, something they were unable to achieve even when they ruled there 20 years ago. Now their white flags can be seen flying in the villages perched along the river as it winds between two towering walls of mountains.
The border, which runs through the Pamir Mountains, is a new fault line in a new reality. It's a place that poses questions to Afghanistan's neighbors, including regional powers like Russia and China, about what a Taliban-controlled Afghanistan will mean.
There are fears that instability could spread from Afghanistan to surrounding countries. Terrorist groups including ISIS and Al-Qaeda have footholds in northern Afghanistan, and Tajikistan is already a major drugs route. And as a catastrophic humanitarian crisis in Afghanistan threatens, so does a potential refugee exodus.
So where does that leave Tajikistan?
The nearly 850-mile-long border is now closed. As the Taliban advanced this summer, groups of Afghans, mostly government soldiers, began to flee across the border. Tajikistan's government reacted by sending 20,000 troops to the area.
The sealed border has cut off the flow of refugees. The Taliban are also stopping people, according to Afghans who've tried to cross.
ABC News reporters visited a stretch of border in the Darvoz region last week. To enter, foreigners must have special permission and pass through three checkpoints. But beyond that, the only visible security force was an occasional three-man patrol of young conscripts.
Locals said things have been calm since the Taliban took over, with the sound of shooting on the other side stopping. Life has been relatively unchanged, they said, except Tajik security service agents now lived in some villages. The three nearby bridges spanning the river all have been closed.
Tajikistan is the only one of Afghanistan's neighbors to adopt an openly hostile attitude toward the Taliban since their takeover. Nearly half of Afghanistan's population are ethnically Tajiks, and in the 1990s, Tajikistan's government supported the anti-Taliban resistance. This time, Tajikistan has again become a sanctuary for resistance leaders.
Ahmad Massoud, the son of the legendary mujahideen commander Ahmad Shah Massoud and leader of the National Resistance Front of Afghanistan, is in Tajikistan, his spokesman said this week, seeking to drum up international support.
But unlike the last time, the resistance has almost no holdouts in Afghanistan, and Tajikistan's government has shown little appetite for assisting beyond offering shelter.
Before Kabul fell, Tajikistan said it could take in 100,000 Afghan refugees, but now it's closed to new entries. Several thousand Afghans did manage to arrive, including 160 U.S.-trained Afghan Air Force Pilots, who are now trapped waiting evacuation.
Those who did reach Tajikistan are now struggling, unable to find work or feed themselves in one of the world's poorest countries. Tamim Talash, a former official at Afghanistan's election commission, is now stranded there with his wife and 4-month old daughter.
"We have a lot of problems," Talash said. "I am jobless now."
Talash, who said the Taliban twice tried to kill him, has applied for asylum in the U.S. but heard nothing so far.
"I don't know how to find out any person or any organization to help us," he added.
The upheaval in Afghanistan has also boosted Russia's role in the region, where it already retains a strong grip on former Soviet colonies. Worried about potential terrorists in those countries, Russia has been moving to bolster them.
Tajikistan's capital, Dushanbe, already is home to Russia's 201st Military Base, the largest it has anywhere in the world outside Russia.
Since the summer, Russia has sent to Tajikistan military equipment and money to construct new border posts and re-equip military forces. The countries have staged large joint military exercises. In October, Russia took journalists to watch the culminating display of scheduled exercises organized by the Collective Security Treaty Organization, a military alliance of former Soviet countries.
Russian troops took part alongside those from Tajikistan, Uzbekistan, Kyrgyzstan, Kazakhstan, Belarus and others at a firing range about 15 miles from Afghanistan. The display, involving around 2,000 troops, simulated a response to an imagined attempt by an Islamist group that had crossed into Tajikistan and declared it an Islamic state.
But Moscow also is building a working relationship with the Taliban. Last month, it hosted the Taliban in Moscow for talks with regional countries, chaired by Russia's foreign minister, Sergey Lavrov.
Russia has asked for, and received, public guarantees from the Taliban that it will not destabilize Central Asian countries like Tajikistan or allow Afghanistan to be used as a launchpad for international terrorism again.
"Just as we want positive relations with others, we also seek positive relations," Amir Khan Muttaqi, the Taliban's acting foreign minister, told reporters through a translator during the Moscow talks. "We remain committed to our commitments that the soil of Afghanistan will not be used to threaten the security of other nations."