Much of the media is at a loss as to what to say about Malmö. For years this was a city where the purported rise of immigrant- and gang-related crime had led to a shooting every two weeks. Now news is coming in that the southern Swedish port may now be the stalking ground for a racist gunman resembling the “Stockholm laser killer” of early 1990s, has suddenly and awkardly changed the perspective.

Overnight, immigrants who had been perceived as a potential threat are suddenly recast as victims. But this has yet to change the general view, that lingers like an afterimage on the retina of the collective imagination, that Malmö is a city where social integration has failed.

Labelled as a irritating eyesore in the Swedish paradise, Malmö was once hailed a monument to modernism and the achievements of pionneering innovators who created the Øresund Bridge and the deconstructivist "Turning Torso" skyscraper.

When Fox News came to town

Then something happened in 2007 when Fox News journalist Steve Harrigan published a report that began with these words: "Swedish authorities in the southern city of Malmo have been busy with a sudden influx of Muslim immigrants — 90 percent of whom are unemployed and many who are angry and taking it out on the country that took them in.” In conclusion he warned that “one quarter of Malmo's 250,000 population is now Muslim". The report reflected the American TV channel’s enthusiasm for portrayals of Europe as an enfeebled victim of Islamisation — where cities like "Londonistan" and "Hamburgistan" offer a haven to terrorists preparing attacks on the United States.

And it launched a media circus in Malmö, with droves of journalists arriving to film youth riots and reports on social exclusion in the deprived neighbourhood of Rosengård. In the years that followed, the extreme-right Sweden Democrats went from strength to strength to the point where they took 20 seats in the Swedish parliament in the September elections this year. Now, with the arrival of a new "laser killer," the media machine is gearing up for a further onslaught.

"A lot has happened in Malmö over the last decade, and that includes many positive developments," points out Mikael Stigendal, a Malmö University sociologist, who has been studying the city for more than 20 years. Stigendal believes that Malmö holds its own when compared to other towns including Copenhagen and Liverpool, which he has visited and analysed. He, however, like everyone else I met, also acknowledges the existence of major problems, in particular endemic child poverty (a third of Malmö’s children grow up in poverty, more than six times the national average for Sweden which stands at 5%) and the poor quality of school results (close to 25% of students who left junior high-school last year lack the necessary qualifications to continue their secondary education, as opposed to between 10% and 11% on a national level).

A city marked by a chronic lack of self-confidence

But when things go badly wrong in Malmö, local institutions take action to resolve the problem. Mikael Stigendal cites the example of the municipal housing corporation MKB: the largest provider of rented accommodation in Malmö, which has been tasked with the renovation of "squalid apartments" that featured in the media reports of previous years.

Negative comment about the city has been countered by some more positive voices in the press. In particular in the culture pages of the major southern Swedish daily Sydsvenskan, where section editor Rakel Chukri and columnist Per Svensson highlight the progress made by the city over the last few decades. A former victim of the industrial crisis, and marked by a chronic lack of self-confidence, Malmö has emerged from the low-lying provincial fog as an outward looking multicultural city of knowledge that is open to both Europe and the world.

From the 13th floor offices of Sydsvenskan, the view extends all over Malmö, including the city’s vast docklands which have been saved from decline to create a joyfully chaotic landscape where huge cargo ships from all over the world tie up alongside new university buildings and apartment blocks. Boundaries are disappearing in the city which offers a heady mix of architectural styles, populations and atmospheres. It is a melting-pot that is markedly different from Stockholm and Gothenburg, where development has focused on the creation of new independent neighbourhoods.

A cloud of shame drifting towards the capital

Is there such a thing as anti-Malmö prejudice? And if there is, where does it come from? Rakel Chukri rolls her eyes to heaven: "I have colleagues in Stockholm who are convinced that if you walk around in the streets here, people will throw stones at your head." And then she adds in a more determined tone, "People have this fixation with Malmö. No one wondered what was wrong with Stockholm when the 'laser killer' was on the loose. At the time, the media just spoke about events ‘in Sweden'," she explains. "People like dystopia stories," remarks Per Svensson. "And Malmö has become a dystopian city for the far right."

When a lonely bicycle-riding nutcase starts shooting at people, hundreds of thousands of people who live in the same city are equally stigmatised. But sooner or later, they will start asking the right questions. What about the mental health programmes? What about calls for more police and better arms control legislation ? What about the desperate need for change in the public education system? When that happens, maybe we will see the cloud of shame drifting northward towards the capital, where it will hang over a government that could think of nothing better to do than to send its condescending Minister for Integration, Erik Ullenhag, to Malmö.