Tino Sanandaji is among the last people one would expect to argue that immigrants pose a threat to Sweden’s way of life. An economist at Stockholm’s renowned free-market think tank Research Institute of Industrial Economics, Sanandaji is a member of a Swedish elite that has long defended open borders. And his own life offers a clear example of an immigrant success story: Sanandaji arrived in Sweden from Iran in 1989, with his mother and younger brother, when he was nine years old. With financial assistance from the Swedish government, Sanandaji was able to attend the elite Stockholm School of Economics. From there he moved to the United States, where he earned a Ph.D. in public policy from the University of Chicago.

And yet Sanandaji now argues that Sweden should stop taking in people who share his background. “Immigration has meant that Sweden has imported a bunch of social and economic problems that to a degree didn’t exist before,” he tells me, sitting in a modern conference room at his office in the upscale Östermalm neighborhood of Stockholm. “For a number of reasons -- a long period of peace, a homogenous population -- Sweden has had a unique combination of welfare, growth, and equality. That idyll is to a certain degree over.”

Over the past several decades, a stream of people from countries such as Bosnia, Iraq, and Somalia have taken advantage of Sweden’s asylum policies, the most generous in Europe. As a result, this once homogenous Nordic country has been utterly reshaped. In 2000, 11 percent of Sweden’s population was foreign-born. Today, the proportion is closer to 17 percent, higher than any comparable country in Europe -- and higher also than the United States, where only 13 percent of the total population is foreign-born.

And far from slowing down, the trend is accelerating. In 2013, Sweden -- a country of 9.5 million -- received a total of 54,000 asylum requests, a 24 percent increase over 2012. In September, Sweden became the first European government to offer permanent residency -- a designation that extends to all immediate family members -- to any Syrian who manages to arrive in Sweden. Since then, Sweden has been taking in Syrians at a rate of more than 500 per week.

All this is happening against the backdrop of big economic challenges. Sweden’s open refugee policies were formulated in the 1970s, at a time when it was the fourth-richest country in the world and unemployment rates hovered just above zero. “Equality” and “solidarity” were the catchwords of the day. It was an easy time to be generous, in other words, to people fleeing dictatorships in countries such as Chile and Iran. But economic growth has been sluggish since the 2008 financial crisis and, even more worryingly, jobs have become scarce -- especially in the sorts of low-skilled sectors that newly arrived immigrants have traditionally flocked to. Unemployment is now stubbornly stuck above eight percent. Among foreign-born Swedes, the rate is twice as large.

Compared with many other Western countries, Sweden has weathered the financial crisis fairly well, and it is still a remarkably comfortable place to live. Sweden’s welfare state remains in place. Every resident of Sweden -- whether they were born there or not -- is entitled to free public health care, a year of parental leave paid by the government, mandatory sick-leave benefits, and free dental care until the age of 20. But the social contract that this system depended upon is beginning to fray, especially due to the scarcity of jobs. According to Lars Trägårdh, a historian who has written extensively on the Swedish welfare state, the hallmark of Swedish society has been a combination of very high social trust and a marked degree of individualism based on a duty to work. Sweden is becoming the clearest case study of a question being asked across Western Europe: Can a modern welfare state be reconciled with rapidly increasing diversity at a time of rapidly dwindling job prospects?

THE RISE OF THE RIGHT

There are many places to watch this unfolding Swedish drama, but a particularly good spot might be a balcony overlooking the center of the Stockholm suburb of Husby. One such balcony, on the top floor of a beige five-story apartment building, belongs to the Al-Khamisi family. The family fled Saddam Hussein’s Iraq in 1994, and arrived in Sweden after a long and dangerous journey, which ended with an arduous ride across the Baltic Sea on a small fishing boat with 60 other refugees.

What you see from the balcony is a fairly typical Stockholm suburb, and very much a physical manifestation of the Swedish welfare state, with all its faults and its merits. It was built in the early 1970s as a part of a massive state program to create a million new homes in a decade. In the beginning, the apartments were mainly filled with working-class Swedes, many of whom had recently arrived from other parts of Sweden.

But over time, Husby has changed. Standing on the balcony today, you see well-kept but graceless four- or five-story housing blocks; a tidy park; a church; a supermarket where you can buy big sacks of basmati rice, jumbo pistachios, and phone cards; and people wearing hijabs and Afghani pakol hats. What you don’t see are many blond people -- a reflection of the fact that 85 percent of the 12,000 inhabitants of Husby were either born abroad or have two parents who were. That makes Husby the mirror image of central Stockholm. Together, they offer a portrait of Sweden’s segregation problem. Immigrants live in satellite cities, removed and out of sight. Until something happens.

A year ago last May, the Al-Khamisis’ balcony was also the perfect vantage point to watch the riots that shook Husby, making headlines around the world. “Right down there, cars were burning,” said the 25-year-old Rami Al-Khamisi, the second oldest of the family’s five sons, pointing to a road beneath the house. “That same street is the way the police came. And that pedestrian overpass, leading to the park -- that’s where the kids stood, throwing stones. My mother was terrified. She stood here screaming, ‘Baghdad! This is like Baghdad!’ ”

It wasn’t really like Baghdad. The riots were actually quite Swedish. When similar riots struck France, in 2005, some 10,000 cars burned. Several thousand people were arrested. In 2011, during riots in the United Kingdom, five people were killed and 2,000 people were convicted of criminal activity. In Sweden, on the other hand, fewer than 400 cars were torched. There were some minor injuries --mainly police officers hit by stones -- but no one was seriously hurt. No looting took place. Thus far, 19 people have been or are being investigated by public prosecutors, and four young men have been convicted for minor crimes.

But despite the limited scale, what happened in Husby touched a raw nerve in Swedish society -- and soon became enmeshed in Sweden’s increasingly complicated politics over immigration. A little over a week after the riots, Jimmy Åkesson, the 34-year-old leader of the Sweden Democrats, a far-right, anti-immigrant party, delivered a speech in which he solemnly declared, “My friends, this won’t do.” Later uploaded to YouTube as “Straight Talk on the Husby Riots,” Åkesson’s speech squarely blamed Sweden’s immigration policies for the unrest: “A gigantic, social experiment has been forced upon the Swedish society. It is now clear that this experiment has failed. The vision, utopia, dream of a multicultural society has fallen apart.”

Until the mid-1990s, the Sweden Democrats were a party of militant skinheads in black uniforms. Its xenophobic message is unchanged, but today the group presents itself as Sweden’s only reliable guardian of the welfare state. A television ad released by the party for the 2010 elections depicts an ethnically Swedish retiree hobbling forward while a hoard of Muslim women in burqas greedily charge past to grab money from the national coffers. The choice, a voice-over explains, is to “cut money from immigration budgets, or from pensions.”

This messaging plays into the worries of many Swedes that the welfare state is increasingly fragile. Over the past two decades, the size of Sweden’s welfare state has shrunk. Public spending has fallen from its peak of 67 percent of the GDP in 1993 to 52 percent today, as taxes have been cut quite drastically: as a percentage of the GDP, overall taxes have gone down from 51.4 percent in 2000 to 44.3 percent in 2012. Both services and benefits have been cut -- most notably unemployment benefits -- and big parts of the welfare sector have been opened to private, profit-making companies.In international economic circles, this has been hailed as a new “Nordic model” -- a lean but well-financed and still generous state. But for many Swedes, the cutbacks carry a clear sense of loss. And, increasingly, some Swedes seem inclined to blame immigrants for that feeling.

In the 2010 elections, the Sweden Democrats earned 5.7 percent of the vote, enough to enter parliament. Post-election surveys clearly showed that the party got most of its support from working-class male Swedes -- the group, apart from immigrants, hit hardest by the shrinking supply of low-skill jobs. Today, as the next general elections in September draw closer, most opinion polls show the Sweden Democrats at close to ten percent. A recent survey showed that about 30 percent of young male members of Landsorganisationen, Sweden’s largest trade union, support the party. Thus far, the government has carefully avoided dealing with the party, and no one expects this to change after the coming elections. But as the party grows, the lure of the policies that the Sweden Democrats espouse clearly grows with it.

USING A MEGAPHONE

Rami Al-Khamisi is a fierce-looking young man, with close-cropped hair and a physique shaped by regular visits to the local gym. But he is no delinquent -- quite the opposite. He’s in his second year as a law student at Stockholm University, and in recent years, an organization he helped found, Megafonen (“The Megaphone”), has emerged as one of the most notable community organizations in Stockholm’s suburbs. Unlike the Swedes who think of immigrants as the cause of recent tensions rippling through Swedish society, Al-Khamisi blames the tax cuts, privatizations, and cutbacks to the welfare state.

As we walked through the neighborhood, Rami seemed to know pretty much everybody. Meeting some teenage boys hanging out in a doorway, Rami shook hands. “What’s up,” he said. “You on your way to school?” (It’s a question with an uncertain answer: In Husby, 19 percent of the 15-year-olds don’t have the grades to earn placement in high school.) As we reached a footbridge near his building, Rami pointed to a low-slung yellow building with peeling paint and darkened windows. Inside, you could see furniture strewn about, like someone had left in a hurry.

“This used to be the Yellow House, a place for kids to hang out,” Rami said, peering through the broken blinds. “It’s been closed for five, six years. There was another place as well, called the Barn, that closed ten years ago. They used to arrange all kinds of things. In the summer, we went out into the Stockholm archipelago, camping and stuff. In the winter, we went skiing in Fjällen -- the mountains up north. Now, there’s almost nothing.”

“I think the politicians might understand that kids here need something to do,” Rami continued. “But they don’t live here, they don’t know our reality, so they don’t realize what it does to the neighborhood when they board up places like this. Most kids here don’t have their own rooms; they live six, seven people in a two- or three-bedroom apartment. So where do you hang out? At McDonald’s, feeling like a bum? You know what happens? They’ll start looking for some action.”

Listening to Rami, it is easy to get a dark view of Sweden’s future. He sees -- as does the immigrant-turned-economist Sanandaji -- a whole generation of “lost kids” in areas like Husby, boys with an immigrant background who are at risk of never truly becoming part of society. But that’s not because they’re not integrated into Swedish culture. “Most of the kids who rioted were born here and speak no other language than Swedish,” he said. “So what exactly should we integrate into?”

What Rami sees instead is a generation that, lacking education and real jobs, feels excluded from the possibility of ever having a voice in Swedish society. “I’m sorry to say, but there are so many here that are already on the wrong path,” he said. “I don’t know what it’ll take for the politicians to realize that the segregation you see here -- it’s a problem for all people in Sweden. Because this is our country, too.”

AN IMMIGRANT COUNTRY

The politician in charge of trying to solve this peculiarly Swedish puzzle -- at least until the September elections -- is Erik Ullenhag, the integration minister. Since 2006, the Swedish government has been a center-right coalition under conservative Prime Minister Fredrik Reinfeldt. But the 41-year-old Ullenhag is a member of the Liberal Party, and his politics on immigration don’t deviate from the Swedish establishment consensus that straddles both the left and the right and argues that the country’s open immigration policies should be kept in place. In 2010, after the Swedish Democrats earned a place in parliament, the Reinfeldt government made a point of agreeing to an immigration deal with the Green Party that guaranteed just that.

“We deal with this differently than in most other European countries,” Ullenhag said. “It’s about showing political leadership. Instead of adjusting our policies to the Sweden Democrats, we stand up for being open and tolerant. We’re a small and rich country; we should take our share of responsibility in the world. And we think that if people who come here get jobs and become part of Swedish society, there is a lot of support for the idea that people should be able to continue coming to Sweden.”

Ullenhag points to surveys showing that Swedes have become more positively inclined toward immigration in the past decade. And he insists that, in the medium term, there are clear economic benefits to immigration. “In 20 to 25 years, I think we will see a situation where this openness has been very good for Sweden,” Ullenhag said. “It’ll make us stronger in this globalized world.”

But he admits that there are challenges -- above all, with education and jobs. “The big integration challenge is that too few of the recently arrived have jobs. And it’s true that a lot of the simpler jobs have disappeared from the labor market in the past few decades. But we think other sectors, like the service sector, can fill these gaps.” To that end, the government has put in place a number of reforms to ease entry to the job market -- Ullenhag points to tax subsidies to domestic services and a focus on vocational training in school. But so far, they don’t seem to have put a serious dent in the high unemployment numbers.

But economics aside, Ullenhag admits that Swedish society will have a problem as long as Swedish citizens don’t recognize that they need to alter their own sense of national identity. “Sweden is an immigrant country today, as much as the United States or Canada,” he said. “But have we gotten used to it yet? No, not really. This is still a country where many people who were born here identify themselves as immigrants. Which means you’re not really part of society. That’s the big challenge. We have to get better at coming together around a common future -- instead of focusing on where your mom and dad were born.”

BUILDING THINGS

A glimpse of this Swedish future can be caught at Arlandagymnasiet, a high school in Märsta, half an hour north of Stockholm, which offers remedial Swedish classes for immigrant students. On a recent morning, Ayaan Hassan Ali, a 16-year-old recently arrived from Somalia, was sitting in a modern classroom, with blue chairs and bright wood paneling on the walls. In one corner, there was a large flat-screen TV, in another, a map of the world, and in the back, a couple of bookshelves filled with dictionaries: Swedish-Arabic, Swedish-Russian, and Swedish-Tigrinya among them.

Ayaan spends almost every afternoon studying at home so she can come to class well prepared. After two months in school, she says she still has a hard time speaking Swedish, but her reading and writing have improved considerably. “I want to be done with the language introduction by the end of this year,” she said. Her aim is to earn a middle-school diploma as quickly as possible, so that she will be able to begin high school and eventually study engineering at a university. It is an ambitious plan. “Some of them complete it in a year,” said Veronica Suskic, the headmaster in charge of the introductory program. “But very few.”

Ayaan’s main challenge might not be her own motivation but her fellow students -- and a school system under strain from the steady arrival of new immigrants. Ayaan is one of only two girls in her class of about 20. (It’s a number in constant flux, Ayaan’s teacher, Thomas Engqvist, said, since new kids come all the time, while others “move, get deported, some just disappear.”) Many of the boys arrive to Sweden as unaccompanied minors, most of them from Afghanistan. The others in the class are from Albania, Eritrea, Kyrgyzstan, Poland, Somalia, and Tajikistan.

“It’s a difficult environment in which to teach,” Engqvist said. “The testosterone level is pretty high, and their level of education tends to vary a lot. And then we have the whole world in the class -- you get mini wars, conflicts that sometimes boil over.” The situation shows no sign of letting up. With a wry smile, Engqvist quoted a colleague who said that, “as long as there are wars in the world, we have a job.” And there are always wars, he pointed out -- “right now, in Syria.”

That day, the class spent several hours reading aloud a simple text over and over. After they had finished, the teacher turned to the class to test them on vocabulary. “Modig,” he asked, using the Swedish word for brave. “Does anyone know what modig means?” Silence. “Okay, it’s when you do something even though you’re afraid to do it. Does anyone have an example of being modig?”

“It’s like when a small guy picks a fight with a big guy,” one of the Afghan boys, 17-year-old Sadiq, said. Like most of the Afghanis in the class, Sadiq had arrived alone, after passing through some ten countries on the way. “Yes! But he has to be afraid,” the teacher said. “Otherwise he’s just stupid. Someone else?”

Ahmad, one of the Somali boys, tried telling a story about how he was fleeing his home in Somalia and crossed a river filled with crocodiles. But the gap between his halting Swedish vocabulary and the sheer horror he wished to express was too wide, and the teacher was unable to follow along. Instead, he asked, “Ayaan, is being modig something good?” Ayaan looked down into her book, thinking hard. “Yes,” she said in her deep voice, a voice that makes her seem older than she actually is. “For example, when you dare to do a test even when you’re afraid you will fail.” She paused. “Or when you speak up, even though you don’t want to.”

Later in the day, the class had a discussion about jobs. Sadiq, the 17-year-old Afghan boy, asked me if being a journalist was a good job. After being told that becoming a lawyer or studying economics would be better if we wanted to make money, he nodded absent-mindedly. “How about welding? Is that good?” It turned out that he’d been a welder since the age of five. He looked proud. “You’ll always have to build things, don’t you?”