A prosperous trading port by the early Middle Ages, Ystad squats on Sweden’s south coast and retains its original fortified structure of a ringed town with three gates – Vasterport, Norreport and Osterport (west, north and east). The southern ‘gate’ facing the mainland continent of Europe has always been its harbour.

It’s for this that the modern town has entered the world’s popular conscience. Ystad is home to the Swedish detective Wallander, created by local writer Henning Mankell as a product of Sweden’s open-door immigration policy in the 1980s and witness to a rise in racism and violence.

Ystad’s Stora Vastergartan, a curving street of cottages

In the week of the Swedish Election, in which feelings were running high both for and against immigration, it was interesting to visit the town – albeit with a fictional identity – that people outside of Sweden now recognise as a microcosm of a changing Europe.

Far from being a dark and foreboding place Ystad is extraordinarily pretty and, in some corners, supremely stylish. We bought a guide, “In the Footsteps of Wallander”, which in fact gave views of the small town that we wouldn’t otherwise had seen.

Location of the Swedish TV Wallander’s house

Established as a herring trading port in the 1100s it benefited from the protection of the early Swedish Church and traded with other Baltic ports.

Around 100 years later the town’s oldest church, the magnificent brick-built Santa Maria Kyrka, and nearby Greyfriars Abbey were consecrated.

The church expanded over the centuries keeping an oak-carved altarpiece from the 1400s and a striking goblet-shaped baptismal font from the 1600s. Its 59 meter high tower employs the only resident night watchman (and bugler) in Sweden.

The Hanseatic League took an interest and the medieval life of Ystad was dominated by annexation by the Swedish and reconquest by the Germans. Many of its most beautiful streets date from around this time, home to prettily painted wooden houses and half-timbered merchants’ homes, warehouses and craft makers’ quarters.

Per Halas courtyard is the only preserved block of half-timbered houses in the Nordic countries. The painted red buildings set around a cobblestone courtyard have wooden galleries, corbelling and decorative brickwork. Once through the low-ceilinged passageway it is easy to imagine a medieval market place. Today its home to artisan craft and gift shops.

Painted houses and roses

The town became finally Swedish in 1658 and had later boom years in the 18th century. Wandering through its bustling centre we both commented that it was not at all touristy in feel.

Fashion shops were holding end of summer sales, families were eating al fresco at restaurants and packs of teenagers were roaming between ice cream bars and cafes. Faces were largely white, but we did bump into an Imam by the Abbey’s duckpond. By 6pm the centre had emptied as shops and businesses closed, and people headed home for the traditional Saturday night spent together with family.

Ystad Port

We went down to the port, where one of the daily services from Poland was arriving, laden with freight trucks and passengers. Sweden imports a huge amount of its food and consumables from Europe, maximising on the strength of its Krona against the Euro.

Yet the Swedish property market is currently in crisis with forecasters saying that more housing is needed for a growing population and for younger generations hungry to live in the urban centres.

Walking along the shoreline at Ystad Sandskogs Strand

Along the coastal path from the centre of Ystad is a large new community of sleekly modern apartments with its own Netto supermarket, primary school, a health centre and a purpose-built subway under the main road connecting it directly to Sandskog Beach.

Down at the shore line of rock-strewn fishing coves, painted rowing and sail boats had been pulled up alongside wooden fishing huts. Ystad seemed a remarkably comfortable, authentic coastal town and a tempting place in which to live.