Somali men gather at the International African Grocery in Liberal, Kan., where meat-industry work has drawn them and kept them. (Christopher Smith/For The Washington Post)

First a stream of newcomers started renting ramshackle homes by the train tracks, and then a two-room mosque opened on a nearby street corner, and then an African grocery store took the space of what had once been a used-car lot.

And then, one day early last year, a bus pulled up to the Greyhound station and out came the latest arrival to the growing neighborhood known as “Little Somalia.” Mohamed Ahmed, 23, held one suitcase and clutched a plastic bag with migration documents — the evidence of a trek in which he’d fled warring Somalia as a young child, lost his father and spent years living with the remainder of his family under a United Nations tent in the Kenyan desert. His journey to America had been nearly two decades in the making, and now he was coming to its heartland — as were thousands of other Somali refugees — to take a grisly job that few others in his new country wanted to take.

Ahmed had heard from a relative that the job was hard; some workers showed up and lasted a year. Others bailed within weeks. But Ahmed figured, at least at the time, that not even the United States’ bleakest economic realities could stifle his hopes for the future: He wanted to save money and, eventually, earn a high school diploma and a college degree. So after a two-day bus ride from Mobile, Ala., the city where he’d initially been settled as a refugee, Ahmed arrived in Liberal and headed straight to National Beef, the slaughterhouse on the edge of town. That week, he became the plant’s newest Somali employee.

“I can make this work,” Ahmed recalled telling his mother, Kadija Osman, who was still in Kenya, on his phone the next time they talked.

The job might be hard, Osman told him, but “it won’t be forever.”

Jobs at National Beef have brought a wave of Somali immigrants to Liberal, Kan. (Christopher Smith/For The Washington Post)

For Ahmed, the job at National Beef meant butchering parts of 3,000 cows per eight-hour shift, a supervisor standing right behind him, using the knife so furiously he would sometimes feel like his ribs were shaking loose. But the job was also a test of the limits in America for a largely destitute, unskilled and growing influx of Somali refugees, a group that was now prevailing in the competition for grueling jobs because of the very desperation they were trying to escape.

“Go there, come back, go to sleep,” Ahmed would say months later about his factory life, when he began to worry that there’d be no school, no better America to find, no reprieve from meat. “Go there, come back, go to sleep.”

Though meatpacking plants have long relied on labor by immigrants, particularly Hispanics, major companies have moved to hire Somalis, who have the dual advantage for employers of being legal and relatively cheap. In one slice of a changing low-wage America, these are the new ideal workers.

Only a decade earlier, meatpacking jobs went almost exclusively to Hispanics. But now more Mexican immigrants are leaving the United States than coming to work, and the number of unauthorized immigrants is receding after decades of growth. As much as Hispanics had seized upon low-skill industries with their arrival, their gradual departure — fueled by tighter border enforcement and improved prospects back home — is opening up new opportunities at the bottom of the U.S. economy, particularly in industries like meatpacking that had also been stung by a wave of immigration raids.

As a result, “Little Somalia” neighborhoods are sprouting up in dozens of towns across the Great Plains, and slaughterhouses are hiring Somali translators for the cutting floors and installing Muslim prayer rooms for employees. Ahmed was now just one in a wave of several thousand Somalis being lured to the meatpacking floors, ready to take jobs that — at $13 or $14 per hour — easily marked the best-paying work they could find.

For Somalis, the slaughterhouses have emerged as the primary alternative to economic hardship. The poverty rate for Somalis living in the United States — at 57 percent, according to the 2010 Census — towers above those of all other ethnicities or nationalities. They tend to live in inner-city public housing and hold minimum-wage jobs. And their plight in the country — at a time when a record number of refugees globally are fleeing repression and war — shows the lasting disadvantages facing a group escaping a failed state. Even after that group starts over in one of the world’s richest nations.

The chain of events that drove Somalis into meatpacking began in warring cities like Mogadishu and Barawa, and ended in places like Liberal, a town of 25,000 just three miles north of the Oklahoma panhandle. All around Ahmed’s new neighborhood, Somalis were arriving in used cars, packing two and three into a room, sleeping in shifts and reporting for work at National Beef — one of the United States’ four dominant meatpacking companies. “A real man’s job,” one worker had warned Ahmed, but many of the Somalis were guys in their early- or mid-20s who wore soccer jerseys and hoodies, divided chores and let their kitchens grow cruddy. Virtually all had arrived in Liberal in the same way Ahmed had: They’d been holding low-paying jobs elsewhere, and then heard about this better-paying job from a friend or relative.

Mustafa Jama of Somalia, center, works to improve his English-language skills in an adult education class in Liberal, Kan. (Christopher Smith/For The Washington Post)

In Mobile, where he lived for six months, Ahmed had been cutting grass at a golf course, earning $9 per hour, heading there on a bus that came once a day — around 5 a.m. Then Ahmed arrived in Liberal and saw a place that was small in a way he didn’t know America could be: He gawked at the brown and beige frontier town storefronts and the grid of streets, stunning in their silence. The only motion, Ahmed thought, seemed to be a funnel of white smoke twisting and belching on the edge of town.

A cousin drove Ahmed to the National Beef factory on his first day of work. It was white and gray, windowless and long, the size of a city block, with the head of a cow painted on one side. Eighteen-wheelers ferried cattle through a gated entrance.

Ahmed had been around animals before, but he was still knocked back by the smell that spewed from the plant. It was thick and meaty, something spoiled and hot, and Ahmed covered his nose.

“It’s like goats,” he said, “in a refugee camp.”

Escaping a wrecked nation

Just for the chance to work in America, Ahmed and his family needed to escape a country that remains one of the world’s most wrecked nations, demolished by a 25-year civil war. The life expectancy in Somalia is 51. Fewer than half the nation’s children attend school. New governments have replaced new governments more than a dozen times over.

From that chaos, more than a million refugees have spilled across the border, including Ahmed, who fled with his father, his pregnant mother and two younger brothers in 1998. Ahmed was 5, and on the bus ride toward Kenya came the first in a long series of obstacles: A team of Somali bandits hijacked and robbed the vehicle. After a 20-mile walk to the next town, his mother pawned a pair of earrings she had quickly stashed away for new bus tickets to Kenya.

For the majority of the next 16 years, Osman lived with Ahmed and her three other children in Dadaab, the world’s largest refugee camp, a red dirt grid of tents that formed at the start of Somalia’s civil war and now contains nearly a half-million people. Ahmed called it a “big city” where the “sun is over your head all the time.” Everybody is waiting on applications to go somewhere else, he said, and many people die never hearing a word.

And then, in 2014, Osman got a call from an agency called the Resettlement Support Center Africa.

The United States had reached a decision on her case.

So Osman sneaked away from her family and took a bus ride through the Kenyan capital. At the resettlement center, she stood in line for an envelope — the final yes or no inside — and an official told everybody not to open it on site; they didn’t want people to celebrate and sob all in the same place.

Osman tucked away the envelope and walked several blocks, as she’d later recall, sitting down on a bench. For years, she and her children had gone through interviews, submitted medical records, answered the same questions. Fewer than 1 percent of the world’s refugees get to resettle in a new country. “Whatever happens happens,” Osman remembered telling herself. (She spoke to a reporter through a translator). “You could die the next day.”

Central Nairobi was crowded. She opened the envelope and kept it close to her chest, reading.

The letter said that she and her four children — Mohamed Ahmed, Ahmed Ahmed, Elyas Ahmed, and Ayaan Ahmed — could resettle in the United States.

Osman read the letter twice. She called a friend to double-check the technical English.

She tried to stifle a creeping smile.

“Just so nobody else could notice,” she said.

Then, she took the bus home.

For years, she’d been vague with her children about the details of the resettlement process, because, she said, she didn’t want their hopes to “get too high.” But it was she whose edges had hardened. Ahmed, the oldest, could scarcely remember Somalia; Osman remembered petrifying nights when neighbors were being killed. Ahmed rarely spoke about his father; she recalled every detail of his departure — how in 1998 he willingly returned on a dangerous mission from Kenya to go back to Somalia to tell his parents about the birth of a daughter, and how he was never heard from again. Was he killed? Did he go elsewhere? Every time a boat of migrants overturned in the Mediterranean and ended up on the news, Osman wondered what had happened.

Back at home, Osman gathered her children and handed them the envelope.

They shrieked and hugged.

They prayed, they called over their neighbors, they cooked food.

Ahmed decided he’d go to America first. He was 21, the eldest, and had the choice to do so. The others would follow soon behind.

Only for a moment did Osman try to calm her family. The main thing she wanted of America was peace.

“Don’t let your hopes get too high,” she later recalled telling her family. “You cannot just cry or laugh. You don’t know where this ends.”

Unsettled in a routine

Ahmed lived for six months in Liberal with three other National Beef workers, and then his family arrived. His sister, the youngest, enrolled at the local high school, and his two younger brothers got jobs at the meat plant, all on the same shift, 3 p.m. to 11 p.m., that was most popular for Somalis. They found a two-bedroom apartment across from the African grocery store for $765 per month and the International Rescue Committee provided them with a kitchen table and some worn furniture. They decorated the home with giveaway Kansas Jayhawks calendars and pinned tapestries over the bedroom windows, sealing out all daylight so the brothers could sleep from 4 a.m. until noon.

Ahmed, thin with an easy, toothy smile, needed and liked the money. He and his brothers bought a car, a used Saturn. He bought a laptop on Black Friday. He wore a hat that said “Detroit” and felt kind of like an American.

But then the sameness set in.

Ahmed slept and worked. He worked and slept. He got home late and watched European soccer in a daze. The main difference in each shift was the number of cows that came down the line: 2,700, 2,900, 3,100.

“You cut and cut and cut,” Ahmed said, and he had periods of wheezing breath, and talked less about school.

The cows came in from Colorado and Kansas and Oklahoma and went out as steaks and ribs to foreign countries and American restaurants. Ahmed was just one cog, giving a few cuts to the fat of the animals’ legs long after they’d been killed with a bolt to the head, shucked of the skin, drained of the intestines and shaved into portions. Where Ahmed worked, on the cutting line, the temperatures were just above freezing, and the meat felt hard and cold. He wore steel-toed boots and bundled himself in sweatshirts, and he used a six-inch blade that grew dull as the shifts dragged on. Monday: Cut, cut, sharpen. Tuesday: Cut, cut, sharpen.

And now it was Wednesday, another shift ending after midnight, and Ahmed folded onto the ­second-hand sofa as his sister slept in the other room. The bedroom doors were closed. The light was dim.

The brothers whispered, and Osman turned on the gas range, a steam smelling of chicken and spices filling the apartment.

“Could you open the door?” Osman said.

Elyas got up and cracked it open.

Ahmed shifted on the sofa and complained that he was a little sore.

“Every day, I tell myself, ‘This is the last shift,’ ” he whispered to his mom. “And yet, every day I come back.”

“It’s the paycheck,” Osman said. They were saving money. And for her, in a point of pride, they didn’t need government assistance. No food stamps, no welfare. They were doing better than most, she thought.

“Yes,” Ahmed said, but he tried to convince her of the strain. “Some days, so many days, people quit. Just put down their knives. The supervisor has to jump in and take their place.”

Osman paused the cooking and walked closer.

“If you are in America,” Osman said now, “you can work and be in peace. No anxiety.”

“But mom,” he said, “we want to start all over here. Every day — go out and come back. National Beef, home. National Beef, home. No future.”

“That routine, it’s good,” she said.

“People here have to go to school,” he said. “To earn respect. To fit into society.”

The conversation waned. Osman walked back to the kitchen and Ahmed opened a new window on his computer, pulling up YouTube videos of Kenyan police forces rounding up illegal Somali immigrants. He scanned Facebook. He talked again about school, but figuring out the specifics — Where would he enroll? Could he handle the work? What would it lead to? — felt daunting, and leaving Liberal was a task he’d save for another day when he had energy and felt good.

“What I want,” Ahmed said, and now it was 3:30 a.m., nearly bedtime, “is just somewhere different.”

A migrant industry

The Somalis who were coming to Liberal were drawn by what they viewed as the decent pay, but meatpacking plants, too, had been migrants of a kind, decades earlier abandoning cities — Chicago, New York — and decamping to agricultural states with anti-union laws as a way to find cheaper labor. The industry’s shift to the Great Plains, beginning in the late-1960s, was completed in almost two decades. The old workers stayed put in the cities. And a formerly blue-collar industry began recruiting lower-paid foreign-born newcomers.

“Instead of the animals being brought to the workers, the workers came to the animals,” said Don Stull, an anthropologist at the University of Kansas who has studied the beef and poultry industry.

When National Beef opened in Liberal 1970, the local newspaper said managers were already doing “extensive” recruiting, bringing in workers from 1,000 miles away. Some Vietnamese came first. Then came a flood of Hispanics, a change that turned Liberal’s Seward County into one of the most diverse tracts in the country. Taquerias and carnicerias opened in strip malls south of town. The local high school became ­majority-Hispanic. A second- ­generation Mexican-American won a spot on the previously all-white city commission.

Then came a new wave of changes, and this time the results for Liberal were more fraught.

The number of unauthorized immigrants in the United States — the majority of them Hispanic — began to slowly drop off after reaching a peak in 2007. Several factors, including a massive recession, helped to end a two­and-a-half-decade influx in which the illegal population soared from 3.5 million to 12.2 million.

Right as that population topped off, raids took aim at an industry to which immigrants had flocked.

On a single day in 2006, agents in flak jackets descended on six plants across the Midwest belonging to rival meatpacker Swift, sweeping up 1,300 workers. Less than two years later, in another raid on the country’s largest kosher meat slaughterhouse, in Iowa, it wasn’t just the workers that were arrested; it was the managers. “That scared the hell out of every HR director in the country,” said meat-industry expert Mark Grey, the director of the Iowa Center for Immigrant Leadership and Integration at the University of Northern Iowa.

After the 2006 raids, Swift began busing in Somalis and Burmese to one of their rural Texas plants from a nearby city, Amarillo. Other meat processing companies that hired Somalis offered them small bonuses for referrals. At some plants, refugees from Burma and Sudan also found jobs.

Among the estimated 150,000 Somalis in the United States, several thousand now work at meatpacking plants, according to estimates from academics who study the Somali diaspora, most having entered the industry in the last few years. They’ve flooded to the industry in particular because, outside of meatpacking, few manage to find jobs that pay significantly more than minimum wage. They stock shelves on night shifts, they drive taxis, they work at airports.

Immigration experts say Somalia’s dysfunction left its people with compounded economic challenges: They not only have rock-bottom educations, but also tend to live in female-headed homes — the result of a war that killed so many men — making it harder to grow wealth with just one potential worker. Among Somalis who arrived as refugees between 2004 and 2013, only 25 percent were literate in their own language, according to the nonpartisan Migration Policy Institute in Washington.

“There’s a persistence in the trauma they carry with them,” Michael Fix, the institute’s president, said.

In Minnesota — a hub for those from the Horn of Africa — the typical Somali household earns $18,400 per year, half of what Mexicans make and one-third of the typical Minnesota household. For many, take-home pay is further slashed by repatriations to family members back home.

Somalis now comprise about 100 of National Beef’s 3,100 workers, according to employees. The company, in a statement, said that it did not track data on employees based on “country of origin,” but said that it welcomes “individuals of any nationality who are legally able to work in the United States.” Other meat towns that have attracted Somalis include Lexington, Neb.; Noel, Mo.; Garden City, Kan.; and Fort Morgan, Colo.

The shift has transformed not all of Liberal, but rather just a few neighborhood blocks that most days sat almost silent, other than workers coming and going. A few residents of Liberal felt scared that the “next beheading or terrorist attack will happen right here,” the mayor, Joe Denoyer, said in an interview. But mostly, they viewed the Somalis as a mystery, sealed off from everybody else.

The Somalis didn’t buy homes. They didn’t come to town meetings. They didn’t show up at restaurants. The community was seen en masse only on weekends, filing into a small mosque — “Mosque of Liberal,” was written in pencil at the entrance — where the imam was a 23-year-old, Yusuf Hussen. He also worked on the National Beef packaging line.

A painful motivation

Thirteen months into his job at National Beef, Ahmed developed some sharp pain in his wrist — tendinitis maybe — and he decided it was the final push to look for a new job. For several days in late March, he made phone calls, most of them between 1 a.m. and 3 a.m., after his shifts.

He reached an old roommate from Mobile who was now at a factory that manufactured egg cartons. The job was in Fargo, N.D. It paid $11 per hour. It wasn’t so exhausting.

Ahmed quickly told his mother and asked her what she thought.

She asked a few questions — could he also find time for school? — but she figured this was a relatively small risk. Fargo was in America, and so Fargo too would be safe. Maybe this job would be easier. Maybe, this time, Ahmed could find the energy for school.

“You’re old enough,” Osman later recalled telling him. “I’ll agree with you whatever you do.”

So they prepared for another departure. Ahmed recruited a few friends to help him on the drive up, and Osman took her son to Walmart, where they stocked up on biscuits and donuts. Ahmed packed his suitcase and Osman made homemade to-go spaghetti meals, with chai to drink. The trunk of the Saturn rose tall with cargo. It was 3 a.m. when Ahmed and his friends were finally ready to leave, following a final shift at National Beef, and Osman and her son shared a hug under the orange light of their quiet street.

“Drive safe,” Osman said. “Stay awake. Don’t talk to one another while driving.”

Only when she went back inside did she realize how nervous she was.

“I didn’t go to sleep,” she said later. “I was praying for him. I was awake.”

Fargo was an opportunity not just for Ahmed, but for the family. If all went well, Osman thought they all could start over there, away from beef, away from a one-job town. Osman plugged “Fargo” into Google searches and studied the schools. The population. The photos. The five- and six-story buildings of downtown. The crisp autumn colors. She liked it. Maybe everybody could move once Ayaan finished ninth grade.

She asked Ahmed about Fargo and he liked it, too; they talked every other day.

But by his third day in Fargo, he still didn’t have a job. The company had taken his application and told him to wait.

By the seventh day, Osman could tell from his phone calls he was getting stressed.

He was sleeping on a spare sofa.

He felt powerless, just waiting there.

He was calling the company, no luck.

He couldn’t go back to Liberal. National Beef had a no-rehire policy.

“We might need a Plan B,” Ahmed told his mom.

She told him not to get complacent.

“You’re not the kind of person who sits and does nothing,” she said. “Don’t adjust to that kind of life.”

Ahmed knew one other friend who had a job lead, and on the 15th day of waiting, he decided to follow it. He packed his bags again and called his mom just before hitting the road. He told her his destination was Aberdeen, S.D., where another company was hiring.

“Don’t worry too much,” he told his mom.

The company was called DemKota Ranch Beef, a packing plant.

Qali Farah contributed to this report.