AT THE height of the migrant crisis the Sweden Democrats, a populist anti-immigrant party, released a video. Over images of burnt-out cars and groups of homeless people it read: “No money. No jobs. No homes. No welfare. Welcome to Sweden.” The message, like a previous video from the party in which burqa-clad women race ahead of an old Swedish lady to grab a share of public funds, was hysterical. But it touched on a real problem: large-scale immigration is putting a strain on Sweden’s welfare system.

Sweden has long been admired for its blend of prosperity and social cohesion. Its model combines high taxes, generous welfare, collective bargaining, high educational standards and a reasonably free-market economy. The result is high living standards: the lowest wages, for example in hotels or restaurants, are far higher than minimum wages elsewhere in Europe says Marten Blix, a Swedish economist. Relative to other countries that have comparable data, Swedish men in manufacturing earn the highest minimum wage.

Aspects of this welfare state have long seemed unsustainable, with an ageing workforce and a recent rise in the number of sick-leave absences taken by employees. Some changes were made in the 1990s: the pension system is far less generous than it used to be, and much more school choice was introduced. But the influx of hundreds of thousands of refugees from Syria, Afghanistan and elsewhere in 2015 has put huge extra pressure on the system. To cope, Sweden needs to reform benefits, build more houses and boost the number of doctors and teachers outside big cities. If it does not, the country will struggle to absorb so many culturally dissimilar migrants—and anti-immigrant views may become mainstream.

The government, led by the Social Democrats, has made a few tweaks to the welfare state. Previously, failed asylum-seekers would receive a cash benefit (of around 1,200 SEK, or $140 a month) and housing; this was scrapped last year. On May 31st the government voted to limit paid parental leave for immigrants: previously, refugees could claim the full amount of paid leave (480 days per child under the age of eight). Now they can only do so if the child is under one year old. The benefit will also be limited in big families. (This change does not apply to Swedes.)

But these changes do not deal with the biggest problem: a rigid labour market which prevents unskilled workers from getting a foothold. As a result, Sweden has one of the largest gaps in employment between native and foreign-born workers. After nine years in Sweden, only half of immigrants have a job. Even after 20 years of residency, foreign-born workers are less likely than the native-born to have jobs. If they cannot work, they will not pay tax. This will undermine the welfare state both directly (because they will not pay for it) and indirectly (because locals may resent supporting so many foreigners). The only way that the newcomers will integrate and contribute is if they have jobs, and that probably means starting at the bottom.

For decades Sweden consciously tried to get rid of low-skilled service jobs, says Karin Svanborg-Sjovall, of Timbro, a free-market think-tank. “We are fanatics about equality here,” she says. These jobs now need to come back to help newcomers. In March the LO, an umbrella body for blue-collar trade unions, indicated that it would accept lower wages for unskilled workers for a short period of time if they were also given the equivalent of a high-school education. So far nothing has happened.

A few local schemes have attempted to step in where the government has failed. In Landskrona, a town of 40,000 people near the southern tip of Sweden, a laundry was opened in May in order to employ low-skilled workers; previously, the washing would be shipped over to Copenhagen. Around two-thirds of those employed there are foreign-born or refugees. “We have tried to create a market for ‘simple jobs’,” says Torkild Strandberg, its liberal mayor. “We have begun delivering while others are talking.”