The search began before dawn; the train had just crossed the border of Tajikistan into Uzbekistan. We were only three hours into the four-day train ride between Dushanbe, Tajikistan’s capital, and Moscow.

An Uzbek border guard, clad in brown fatigues, boarded the train — a Soviet-replica, green, with a silver roof — and began yelling. He moved through the car, searching passenger after passenger, ripping apart belongings, interrogating everyone about terrorism and narcotics, and scanning flip phones and cheap Nokias for “sex photos” (pornography is banned in Uzbekistan). The passengers endured this, unfazed. Almost all of them were migrants traveling to Russia for work. They’d seen this routine before.

It was March. Across Tajikistan, thousands of people — mostly young men — were departing for or preparing to leave for Russia. The long Russian winter was nearing its end; construction projects in cities like Moscow and St. Petersburg were slowly coming back to life.

Tajikistan, the poorest Central Asian state, is among the most labor migration-dependent countries in the world. In 2015, it received the equivalent of 37 percent of its GDP in the form of remittances. Two years before, migrants had sent home the equivalent of 50 percent; by comparison, in 2016, El Salvador and Honduras, two countries with large emigrant populations working in the United States, received 16 and 18 percent, respectively, of their GDP from workers abroad sending money home. Tajikistan’s population recently eclipsed 8 million; at any given time, well over a million of those 8 million people live and work in Russia.

For Tajiks, the train used to be the primary means of reaching Russia. Demand was once so high that desperate crowds formed at the train station in Dushanbe to buy tickets. Now, regular flights between Dushanbe and many Russian cities have become the preferred mode of travel, even though plane tickets can be a few hundred dollars more expensive. “People only ride the train once,” a conductor on a train back to Tajikistan told me later. “Passengers want a relaxed four-day ride. But then they get on and see that it is a hellhole.”

“People only ride the train once,” a conductor on a train back to Tajikistan told me later. “They get on and see that it is a hellhole.”

Some passengers told me that they chose the train out of a sense of adventure — to see, if only through a window, a wide swath of Central Asia. But, for the most part, those who ride the train now do so either out of necessity or out of a sharp sense of just how far a few hundred dollars saved — the equivalent of a month or two of remittances — can go.

Our car — third class, car four — held 54 passengers: 52 men, one woman, and her infant daughter. A narrow, paisley-carpeted passage ran the length of the open car; exposed, too-short beds were stacked on either side, and feet splayed out into the aisle.

The train’s tracks are a relic of the Soviet Union and cover some 2,000 miles, crossing five borders. The route runs from Tajikistan into Uzbekistan, then into Turkmenistan, back into Uzbekistan, up into Kazakhstan, and then into Russia. Since Tajikistan is a member of the Commonwealth of Independent States, a loose affiliation of former Soviet republics, citizens of Tajikistan are allowed to enter Russia without visas. A transit agreement allows visa-free travel through the other countries, so long as the migrants do not leave the train.

But that does not prevent border guards from boarding and conducting their own searches, which they do — our train was searched at least once at each border it crossed.

Between the Tajik and Uzbek borders, we sat for two hours as an Uzbek guard slowly made his way, passenger by passenger, through the car. After a lengthy process, including the dramatic unveiling of the contents of the bag of the man sitting across from me — two bottles of peach soda and a well-wrapped piece of meat — the guard found something that he deemed contraband: a few pounds of the dark chewing tobacco that is popular in Tajikistan and that almost everyone chewed on the train, spitting green wads into trash bags that have been taped, for this purpose, at every row of beds. From the window, I watched as a second guard emptied the bag, dumping enough tobacco to last one man perhaps for a year, or which may have been intended for friends waiting in Russia, onto the tracks.

Two hours later, another set of Uzbek guards boarded for yet another passport check, even though none of the migrants would be allowed on or off the train — not even to stretch their legs — until we reached Kazakhstan, a full day later.

Early spring in Tajikistan means conversations about plans for life in Russia: whether it would be better to operate a fruit stand in Moscow, for instance, or in Samara, a Russian city near the border with Kazakhstan. There are quick calculations of cost — how much for tickets, visas, housing, bribes — and lengthy discussions of work conditions at various construction sites.

Tajikistan has long been tightly yoked to Russia. In the middle of the 19th century, tsarist forces conquered much of Central Asia — including much of what is now Tajikistan — for its cotton. Later, in the 1920s, Soviet administrators in Moscow carved the Tajik Soviet Socialist Republic from what is now Uzbekistan, as a means of establishing greater control over the region.

Under the Soviets, the flow of people and goods went both ways. Tajikistan remained the poorest of the Soviet republics, but, in exchange for its cotton, the production of which Soviet agriculturalists assiduously expanded, Soviet engineers erected dams and factories. Soviet planners converted what had been a dusty village town, Dushanbe, into the capital of the fledging republic; sprawling, brown concrete apartment complexes and pastel-colored, surprisingly graceful schools and universities turned the village into a city. Russian citizens came, too, sent mostly to serve as an upper-class management elite. By 1979, Soviet census data show that more than 10 percent of the population was ethnic Russian. Mirzo Tursunzoda, perhaps the greatest Tajik poet from the Soviet era, enthused of the kinship between Russia and Tajikistan in a poem: “And my Tajik people are now forever / Joined with you.”

Mirzo Tursunzoda, perhaps the greatest Tajik poet from the Soviet era, enthused of the kinship between Russia and Tajikistan in a poem: “And my Tajik people are now forever / Joined with you.”

The collapse of the Soviet Union in 1991, however, prematurely severed relations — at least as Tursunzoda had imagined them. Civil war in Tajikistan between neo-communists and an opposition composed of a medley of democratic and Islamist factions followed almost immediately and ravaged the country. Nearly 50,000 people were killed in a country of just over 5 million, and another 1.2 million were displaced.

Between 1992 and 1997, when the war finally ended — after sustained Russian intervention and mediation — GDP per capita fell by nearly 66 percent. All forms of employment vanished. “People started looking for opportunities elsewhere,” said Zuhra Halimova, a visiting scholar at George Washington University who, until August, was the executive director of the Open Society Institute Assistance Foundation-Tajikistan, a local arm of the George Soros-funded Open Society Foundations. “What they knew more about was about Russia. About the former Soviet Union.” In Russia, she said, “they didn’t feel like strangers.”

At the time, Tajik workers — almost all of whom already spoke Russian because of Soviet schools or had even spent time in Russia while serving in the Soviet military — were allowed to enter Russia using only a local identification card. At first, Halimova explained, those who went believed migration would only be a short-term source of funds: “They all thought they would be [in Russia] temporarily, probably for a year or for a few months. They would send money. They would make sure their living is better. And they would return back.”

But Tajikistan’s economy never really recovered from war. Today, it exports a small amount of aluminum and cotton; a country of high mountains and fast-flowing rivers, it has long held onto the elusive prospect that it may be able to develop its hydroelectric potential for export. It remains the poorest of the post-Soviet republics.

Over time, seasonal migration to Russia became a set pattern. “As with the phenomenon of labor migration globally,” Halimova added, “it’s not a few months’ or a few years’ phenomenon.” Men kept going back to Russia for work, and others began to follow. They felt, Halimova said, that “Russia is a place of opportunity. That it’s so big that you can find a job easily. They started exploring Russia for themselves.” The remittances these workers sent back, in addition to the slow recovery from war, have helped cut poverty dramatically: According to the World Bank, the poverty rate has declined from 72 percent in 2003 to just above 30 percent today.

The Sunday before our train departed, we joined a group of Tajik men having an afternoon barbeque on the wide bank of a river outside Somoniyon, a small village in Tajikistan’s rural Rasht Valley, which stretches up toward the country’s northern border with Kyrgyzstan. A drooping, solitary willow tree provided shade on a surprisingly sunny and warm spring day. The windows and doors of an old, secondhand German-made station wagon were open, and Tajik pop music played from the speakers.

The bank of the river boasted a series of impressive Soviet ruins. Behind us sat a long factory, built in the 1970s, which once produced concrete and raw construction materials. The factory had long since been shuttered, but its mud-colored shell loomed grandly above everything that had been built since. In front of us, small concrete shacks dotted the landscape, the remains of the factory’s outbuildings. Cattle grazed in the wide square basins that used to hold water catchments. Farther away stood the rusted carcass of an enormous machine that once made asphalt; children played on the conveyor belt.

The men, all of whom are now in their early 20s, grew up together amid these ruins. Except, that is, for the years that six out of the 11 of them spent in Russia.

Of those who had gone, Abdullo had returned from Moscow most recently, in January, after a six-month stay. He’d missed the birth of his first child, a daughter, who was born in late July, a few weeks after he left to start work installing electrical wiring in cheap, fast-rising apartment blocks. He spent the first months of her life calling home frequently, eager just to listen to whatever sounds his daughter might make over the phone. His friends in Moscow teased him for wasting his money.

Abdullo was born in 1993, near the start of Tajikistan’s civil war. Just after he was born, his father was killed by a bomb that exploded not far from where we were barbecuing. Abdullo made his first trip to Russia when he was 14, when he sold fruit in a market in Moscow; this last time was his third trip. All three of Abdullo’s older brothers have also spent time working in Russia. One, who works as the de facto head of a small Tajik construction crew in Moscow, has not been back to Tajikistan in years. His wife and children live, along with Abdullo and his family, in Abdullo’s mother’s house.

Abdullo’s most recent trip was so short because it was not a success. Sanctions and falling oil prices have battered the Russian economy. There are fewer jobs for migrants. And the value of the ruble has fallen, eroding the value of the remittances they send home.

Through a friend, Abdullo found work as the third man on a team of three that worked to rig some of the basic electrical wiring in a large, new apartment block in Moscow’s suburbs. The first months were OK, but then his employers stopped paying him. They told him that he would be paid after the new year. By the middle of January, when he still had not been paid, he decided to return to Tajikistan, even though he was broke and hadn’t sent any money home. “It’s a crisis now in Russia,” Abdullo said. “The dollar went up, and the ruble fell down. There isn’t any work, there isn’t any money.”

Compared with some of his friends, however, Abdullo’s situation is not so bad — he can still return to Russia.

“It’s a crisis now in Russia,” Abdullo said. “The dollar went up, and the ruble fell down. There isn’t any work, there isn’t any money.”

At the start of 2015, Russian authorities introduced more complicated and expensive immigration requirements. Where Tajik migrants used to be able to enter on a domestic passport, they must now travel with a standard biometric passport, which can cost more than $300. The 2015 reforms also made it more difficult to get a work permit that allows Tajik migrants, who can enter the country without a visa, to hold a job legally: These permit fees can now cost between the equivalent of $200 and $500. And the process of getting a permit, too, became more convoluted — since 2012, migrants have had to pass a Russian-language test; now, they must also pass a Russian history test — and more rushed, as migrants now only have a month to register upon arrival. In Tajikistan, many prospective migrants said they thought they would have to pay a bribe to get a permit; others said they would risk working without one.

According to Tajik media, deportations have spiked. So has the number of people banned from re-entering Russia for up to 10 years. Migrants can be added to the banned list for administrative violations — not registering for a work permit, for example — or for infractions that can reportedly be as minor as jaywalking. The list now has more than 300,000 Tajik names on it.

Daler, who manned the grill at the barbeque, was deported and banned. He was working in a café in Moscow, which, as he put it, “was good work.” After he was deported, he bought a car with some of the money he’d made in Russia and began working as a local taxi driver, charging passengers a few somoni, the Tajik currency, to go back and forth between Somoniyon, his village, and a bigger town and local college a few kilometers away. He is waiting for his re-entry ban to lift sometime this year. He had a girlfriend in Russia, he said; he would like to see her again.

There isn’t much those who are forced to return to Tajikistan can do. According to Halimova, around 47 percent of migrants have never worked before they go to Russia. They are unskilled and largely uneducated. Some, like Daler, try to earn a living as taxi drivers. In a city like Dushanbe, many returned migrants try to work as day laborers.

Given the fine line between Russia’s economy and Tajikistan’s, it is not surprising that, as prospects have dimmed in Russia, there has been a countrywide, collective tightening of belts in Tajikistan. “The crisis came over from Russia,” Abdullo declared simply.

In May 2015, concerned over the combined effects of the downturn in the Russian economy and the new immigration regulations, the World Bank initiated a survey, Listening2Tajikistan, which included monthly phone interviews. According to William Seitz, a World Bank economist affiliated with the project, “In early 2015, there was substantial uncertainty about how severe the downturn in remittances would be and what impacts we could expect in Tajikistan.” In 2015, the World Bank found that remittances dropped by 24 percent compared with 2014. In 2016, conditions only worsened: Tajikistan’s National Bank reported that, in the first half of 2016, remittances decreased by another 22 percent when compared with the same time period in 2015.

In March 2016, nearly 40 percent of the World Bank’s survey respondents claimed that they were struggling to afford adequate food. “The worst-case scenario did not come to pass,” Seitz wrote over email, “but the survey has highlighted the extent to which households are vulnerable to a variety of shocks that are often outside of their control.”

For many, despite the conditions in Russia, migration continues to be the best means of making ends meet. They have just had to become more creative.

Shuhrat, another man at the barbeque, was deported from Russia in November 2016 and issued a re-entry ban. He hasn’t checked how long his ban is. “There’s a place to check,” he told me, “but I didn’t go. I was afraid.” His job in Russia as a bathroom attendant paid well, so his father — a doctor in Tajikistan — went abroad to claim it instead. “I came back, and he went to Russia. He took my job in the [market], in the same bathroom.”

The train arrived in the Russian capital at midnight, almost exactly four days after it left Tajikistan.

At some point in the 1950s, when Tajikistan was still a part of the Soviet Union, the Tajik poet and Soviet administrator Mirsiad Mirshakarov wrote floridly of entering Moscow: “Like scarlet silk of banners / was the silk of heavens / when I entered the city of Joy / the capital of happiness, glory, and victories / Moscow.” On our train, passengers were met by Moscow’s freezing early spring cold — weather that threatened to hold up construction projects. Police officers, clad in puffy black jackets, guided everyone through a metal detector.

Besides the police officers and the passengers, Kazansky Station, Moscow’s version of Grand Central Terminal, was almost empty. A few cleaners wearing neon construction vests swept the tiled floors beneath a series of high, gilded arches. Off to the side, a VIP salon, replete with leather chairs and painted murals on the ceiling, awaited the morning’s rush of business travelers. Fluorescent light streamed out of the fast food restaurants that were still open.

Most of the train’s passengers disappeared into the night, but a group of 40 or so migrants stayed, taking seats together in an area that was tucked into a corner of the station. They rested their legs on their bags. A few went to sleep, heads propped up by their hands.

One of them, an older man named Shamsiddin, talked to me while his neighbors looked on. This was his 17th trip to Russia. He’d managed to find a construction job that paid him more than $500 a month; the money he has earned in Russia has allowed him to send his two children to college. “I only suffer because I’m far from my family — I have everything,” he said.

(When I spoke to Shamsiddin over the phone a week later, after he had settled into a construction site in Moscow’s suburbs, he would tell me that when he was on the train, no one slept: “Night, at the border, they wake you up. They open your bag. They check everything. They harass you — they think you’re bringing narcotics.” He was embarrassed by the constant searches, the intrusions into his privacy, and the suggestion that he, who was traveling to Russia so that he could support his family, might be up to anything illicit.)

Shamsiddin said the men sitting and sleeping in the station were waiting until the city’s light rail system opened at 6 a.m. Then they would ride it to the various construction sites around Moscow’s suburbs where they would live and work.

But they also seemed to be putting off, for as long as they could, entering Moscow. In his classic 1970s study of migration, A Seventh Man, John Berger wrote of migrants arriving at a train station in an unnamed European city: “In a group they arrive like a band. They tell each other by word and gesture that they are stronger and have more stamina and more cunning than the inhabitants of the foreign city.” The Tajik migrants in Kazansky, huddled together and nodding off on their bags, appeared less sure of their own cunning — or more certain of the hazards they faced. They were together in the train station; outside, they would be alone.

Two days later, Farrukh, a slight 28-year-old migrant with a thin beard, walked me through some of the dangers that Moscow holds for a migrant.

I met Farrukh, who has a wife and two young children back in Tajikistan, at the offices of the Civic Assistance Committee, a small Moscow-based nonprofit founded by Svetlana Gannushkina, a prominent human rights activist who has reportedly been shortlisted for the Nobel Peace Prize a number of times. The committee provides free legal advice to migrants and refugees. The waiting room was packed.

Farrukh was there because he had technically been deported at the end of January. Before returning to Tajikistan, he had to pay a fine and buy his travel back home — and, at the time, he couldn’t afford either.

Though he has a college education, Farrukh has worked construction each of the three times he’s traveled to Russia. This time, at first Farrukh’s employer paid him poorly; then, when winter began, they started withholding his pay altogether — the same thing that had happened to Abdullo. “They only gave me money to buy stuff to live, like food,” Farrukh said. “They didn’t give me my salary.” And by January, he had completely run out of money.

Desperate, Farrukh called a friend to ask if he could borrow money. “He told me, ‘I’m in another neighborhood. Can you come here?’” On his way to meet him, police officers stopped Farrukh in the metro station and asked to see his documents. He wasn’t properly registered. When they asked him for a bribe, he had nothing to offer. “If I’d had money, it would’ve been better,” he said.

“They only gave me money to buy stuff to live, like food,” Farrukh said. “They didn’t give me my salary.” By January, he had completely run out of money.

According to information provided by the Civic Assistance Committee, the Russian visa code has changed more than 30 times since 2013. Most changes have been to tighten restrictions. This leaves migrants at the whim of police officers: Russian courts determine whom to deport; police officers determine whom to bring before the court. Had Farrukh had enough money to pay a bribe — sometimes the equivalent of less than a few dollars — the police officers probably would have let him go.

Instead, they brought him to the police station. “I spent a night there, thirsty and hungry. They put a form in front of me — I didn’t know what was written on it. They only said, ‘Sign.’ There were five of us there, and we signed. We didn’t know what it was for.” The next day, Farrukh was brought to a courthouse, where he learned that he had been deported and banned from returning to Russia for five years.

Now, Farrukh had found another construction job, and he was trying to earn the money he needed so that he could pay his fine and buy his ticket home. If the police picked him up again, however, he faced imprisonment. For him, the fear of that possibility competed with the anxiety over the certainty of what going home would mean: He had to feed his family, and, as he lamented, “I don’t believe that I’ll be able to find work in Tajikistan. There are so many problems finding work there.” He wasn’t sure what he would do.

The Civic Assistance Committee’s offices are near Moscow’s new central mosque, and, on my way back to the metro, I walked past to see the mosque. Sitting at the base of a hill, with a large shopping mall complex above it, the mosque, which was finished in 2015, is lavish and enormous — it has the capacity to hold 10,000 people. I had timed my visit well: It was Friday, so even in the bitter cold, an outdoor overflow zone was full.

When the afternoon prayer ended, I waded into the stream of men exiting the mosque. Large groups of men spoke Tajik to each other as they passed. A few vendors sold trinkets and religious ornaments off to the side. A young Tajik man hawked phone cards for migrants looking to call their families back home; he claimed that he had a deal on long-distance calls.

All around the complex, police waited in cordons. For the moment, they only watched the men pass by.

Later that night, the next train from Dushanbe would arrive. Three or four hundred migrants would exit, joining their friends, cousins, uncles, brothers, fathers. Some, surely, would spend those first hours in the train station, waiting together before going out into the cold.

Reporting for this piece was facilitated in part by the Pulitzer Center on Crisis Reporting.

Joe Schottenfeld is a writer and an Associate Research Scholar at Yale Law School. He was previously a National Geographic Society Young Explorer and a visiting fellow at the University of Central Asia, in Dushanbe, Tajikistan where he conducted field research on labor migration.

George Butler is an artist and illustrator specializing in travel and current affairs.