KUNDUZ, Afghanistan — When the Soviet Army pulled out of Afghanistan decades ago, it left behind rusty tanks, the wreckage of helicopters and a Ukrainian man who now goes by the name Nek Mohammad.

On Feb. 15, 1989, the last Soviet commanding general in Afghanistan, Boris V. Gromov, walked alone behind the last armored column as it rumbled across a bridge out of the country, and declared that Russia was done here. “That’s it,” General Gromov told a television crew. “Not one Soviet soldier is behind my back.”

In fact, 226 soldiers remained, according to the Russian Cultural Center in Kabul — men who were either still prisoners or had deserted. Mr. Mohammad was one of them, and he has now lived here long enough to see Russia seemingly drawn back into Afghan intrigue.

At the time, though, Russians spoke of having an Afghan Syndrome, like the Vietnam Syndrome in the United States; they wanted nothing to do with the country.