“THEY take out the glass windscreens so people won’t shatter them,” says Karl Robbjens, nodding at a bare tram stop in Hjallbo, a poor suburb of Gothenburg. Mr Robbjens, who is of mixed Swedish and Libyan parentage, grew up on a housing estate in this immigrant neighbourhood. To an outsider it looks as immaculate as most of Sweden, with its carefully tended vegetation and flagstone-paved shopping square, but Mr Robbjens paints a rougher picture: “I used to get my ass kicked all the time.” He points out the school where his friends broke windows, and the apartment block where a friend’s sister was stabbed to death.

On August 13th some 20 cars were set on fire in Hjallbo, among nearly 100 burnt in the Gothenburg area that night. Two suspects were arrested. Another who fled to Turkey was picked up there. Swedish police think a Kurdish gang may be responsible. Torching cars is a hobby for young criminals in Gothenburg; police say 172 have been burnt this year, down from 237 in the same period last year. But this attack was scarily co-ordinated, with groups of masked men fanning out to do the job.

Such incidents have kept immigration at the top of Sweden’s political agenda as it prepares for elections on September 9th. During the migration crisis of 2015, 163,000 asylum-seekers streamed into Sweden before the country adopted border controls. The numbers have fallen to about 26,000 per year, but the issue preoccupies many voters. This has been bad for the governing Social Democrats and good for the Sweden Democrats, an anti-immigrant party with neo-Nazi roots. Though they have slid in recent weeks, polls put them anywhere from first to third with at least 20% of the vote, or just over 70 MPs.

One of those MPs will probably be Mr Robbjens. Three years ago, he left the centre-right Moderate party for the Sweden Democrats. As a man of mixed race whose mother was deputy mayor of Tripoli, he seems an odd fit for a far-right party. But he is not against immigrants; he is against Sweden’s failure to integrate them. He voices a common criticism, that because the country has not demanded that immigrants assimilate, too few consider themselves Swedish and too many rely on social-welfare programmes. Yet the newcomers’ impact on Sweden is more nuanced than the Sweden Democrats suggest. A study by a finance-ministry economist in May estimated that refugees who arrived before 2014 would each cost the state about $8,000 per year over their lifetimes. But regular immigrants, unlike refugees, must have private wealth or a job lined up before they come. Immigrants commit a disproportionate number of crimes, but criminologists say they are not much different from Swedes with comparably low incomes. Despite lurid headlines, there is no clear upward trend in most categories of offence, though sexual assaults have risen in the past year. Dan Windt, a police chief in the Gothenburg area, says crime is somewhat lower this year than last. Even the politics of immigration are subtler than they seem. A survey by Ipsos, a pollster, found that when voters were asked to rate their top three concerns, highest came health care, at 44%. Immigration came third (25%), barely above the environment (23%), which has won attention because of immense forest fires this summer, boosting the Greens.

But the Social Democrats split the health-care vote with other parties, including the Moderates and the Left Party. Voters who care most about immigration overwhelmingly favour the Sweden Democrats. “They have total ownership of the issue,” says Henrik Oscarsson of Gothenburg University, who co-directs a study of Swedish voting.

Spurred by the Sweden Democrats’ success, mainstream parties have shifted right. The Social Democrats have become more restrictionist—Stefan Lofven, the prime minister, says he wants to reduce refugee numbers by providing aid to the regions they come from, as have the Moderates. The Greens and the Left—Mr Lofven’s potential coalition partners—are more welcoming, as is the Christian Democrat party.

The Sweden Democrats, meanwhile, have adopted a more restrained tone in hopes of winning centrist votes. The party’s leader, Jimmy Akesson, acknowledges that the country will not be “blond and blue-eyed” for ever, and says he wants to focus on integration, which sounds like Mr Lofven. But he is taking a hard line on asylum-seekers, demanding that Sweden accept only those fleeing oppression in neighbouring countries. Norway, Finland and Denmark are not very oppressive.

As in previous elections, every other party has vowed not to co-operate with the Sweden Democrats. That probably means a minority government. Current betting is on Ulf Kristersson, the Moderate leader, to become prime minister. Whoever forms a government will face a tough job putting together ad hoc majorities to legislate.

Many municipalities, like Gothenburg, are already in this situation. The city’s 13-member executive is split between right and left; the odd seat was won by the Sweden Democrats in 2014. They are shunned by other parties. Besides ideology, says David Lega, the city’s deputy mayor, there is a character issue: the Sweden Democrats’ council member was expelled from his party for allegedly bullying subordinates.

Elsewhere in Scandinavia, anti-immigrant parties wield power. Norway’s Progressives and Denmark’s People’s Party have joined or backed governments. Few see this happening soon with the Sweden Democrats. Other parties dismiss their pro-integration rhetoric. “They have shown no interest whatsoever in facilitating or supporting integration,” says Ann-Sofie Hermansson, Gothenburg’s Social Democratic mayor. But as Mr Robbjens’s candidacy shows, many Swedes—including immigrants—think mainstream parties are guilty of this too.