The medieval city of Magdeburg in the east of Germany is a quaint place where pensioners feed birds in their gardens and students pedal to the university on trendy sit-up-and-beg bicycles.

Yet its residents are scarred by the memories of a dreadful event in November, when a 19-year-old female university student was ambushed at 4am and dragged into the bushes where she was gang-raped.

What particularly disturbed the locals was that three Afghani men from a block being used to house migrants were later arrested and questioned, though it is unclear what has happened to them since.

It was the fourth sexual attack in the city, including the rape of a 24-year-old woman in Magdeburg’s cemetery, which implicated migrants in just a few months.

Crowds of people outside Cologne Main Station in Cologne, Germany, in December

Protesters wave German flags, alongside a banner saying 'Rapefugees Not Welcome' in Cologne, Germany

The student’s rape was fresh in the mind in this capital city of the Saxony-Anhalt region when news began to leak out of Cologne after New Year’s Eve that as many as 1,000 women were saying they had been groped or raped by men of north African and Arabic backgrounds.

Extraordinarily, it emerged yesterday that a high-ranking politician, who said he was acting on behalf of the German state, pressured the police to remove the word ‘rape’ from their report on the night’s mass sex attacks in order to hide the truth from the public.

The police refused, said a respected German newspaper yesterday, and prepared an account stating accurately that ‘a large group of foreign people’ had, indeed, carried out rape, sexual harassment and thefts.

Such alarming reports have had a profound effect on many people in this increasingly fractured society, which has seen a huge influx of young Muslim men from a host of countries after Chancellor Angela Merkel invited migrants from Syria to come to Germany last year.

And their minds will not have been put at ease by the news that a German train operator has announced it is introducing women-only carriages on its trains following the New Year attacks.

The introduction of the carriages, which will be next to the conductor, has already led to heated debate on German social media. The hashtag #imzugpassiert (which translates as ‘it happened in a train’) has become a talking point on Twitter, with women giving examples of when they have been accosted by foreign-speaking men on trains.

The train company, Mitteldeutsche Regiobahn, says it will provide women-only carriages on routes out of Leipzig, an hour’s drive from Magdeburg, with a spokesman explaining: ‘They are designed to make solo female travellers or women with young children feel safer.’

Chancellor Angela Merkel invited migrants from Syria to come to Germany last year

Frauke Petry, head of the Alternative fuer Deutschland (Alternative for Germany, AfD) political party

He denied, improbably, that the move was because of the widespread sex attacks on women in Cologne and elsewhere in Germany, yet it will have done little to assuage the fears of many who have seen countless thousands of newcomers arrive from a different cultural background to be housed in their midst in 2,000 hostels, hotels, tented camps and newly-built blocks across Germany.

The depth of unease here at the numbers was spelt out all too starkly in recent regional elections in Saxony-Anhalt, when nearly a quarter of the population, many aged under 40, voted for the anti-immigration, Right-wing Alternative for Germany (AFD), which has sprung from nothing in just three years.

In the country’s wealthy western states of Baden-Wurttemburg and Rhineland Palatinate, where elections were also held, Chancellor Angela Merkel’s middle-of-the-road Christian Democratic Party (CDU) also lost considerable ground.

It was in Saxony-Anhalt that her ruling party only just managed to cling to power.

The results were a stark condemnation of Merkel’s open-door migration policy, which has caused chaos across the EU.

Many Germans complain that the most powerful female politician in the world has ignored their views by inviting in more than a million people in less than a year from the war-shattered Middle East, impoverished Africa and numerous other parts of the globe besides.

Sympathizers of German far-right movement PEGIDA (Patriotic Europeans Against the Islamisation of the Occident) hold a poster featuring German Chancellor Angela Merkel wearing a head scarf and a slogan reading 'Madame Merkel here are the people'

Lutz Bachmann, chairman of PEGIDA, speaks on Easter Monday during weekly protests

So, what of those migrants who have made the journey and now face deep antipathy from so many in their adopted country?

In a modern block in a leafy neighbourhood of Magdeburg, close to where the student’s rape took place in November, I found Mahmood Atafar, 28, a Kung Fu boxer from Iran’s capital Tehran.

The place has two uniformed security guards at the gatehouse, who sign in all visitors.

A few feet away from them is a high, wire fence and locked gate, protecting the block’s 200 migrants, mostly single and male, from rising resentment (and worse) towards them among locals.

with the help of Piruz, a 38-year-old Iranian fellow migrant who is also living in the block, Mahmood told me in broken English: ‘I came to Germany because lots of other men from my country heard of the welcome by Mrs Merkel.

‘I would never have set off on such a difficult journey on my own. I tore a tendon in my leg on the way to Europe, but I can go to the doctor here for treatment without paying. I am also given 330 euros a month and Germans are kind to me.’

Pegida organiser Lutz Bachmann (left) holds a poster during a political march

This is the just the type of statement that would enrage the 24 per cent of Saxony-Anhalt residents who voted defiantly for AFD and its leader, the charismatic 40-year-old Frauke Petry.

An elfin but sharp-tongued scientist with a PhD in chemistry (she studied at Reading University), she has been caricatured by her critics in the German pro-Merkel political establishment as ‘Frau Dr Strangelove’ after the deranged Nazi scientist played by Peter Sellers in the 1964 anti-war film Dr Strangelove or: How I Learned To Stop Worrying And Love The Bomb.

Her picture has been plastered over the media after she said that police should shoot illegal migrants at the border as a last resort to stop them entering Germany.

But this did not seem to put off voters in Magdeburg, who cannot forget the sexual assaults that have been carried out in their city.

While concrete figures of rapes and sex attacks by migrants are hard to find (the ethnicity of perpetrators are not routinely published), bureaucrats in Berlin are said to be shocked at the number of reports on such crimes reaching them on a daily basis.

The police have also warned of a potential breakdown of public order this summer, when women are more lightly dressed, and they are confronted by young male migrants, now being given Government pamphlets on how to conduct themselves correctly with women in the West.

As I have discovered this year, it is not only in Germany that mass arrivals of men from cultures where women are second-class citizens has caused such problems.

Sweden, which last year took in 163,000 migrants, again mostly single and male, has faced similar sex attacks, many by migrants against girls and even boys on the streets and at swimming pools.

Reflecting the changing mood there, too, a poll by newspaper Aftonbladet found nearly half of all Swedish women are scared to jog or to walk alone at night.

The result of such concerns is that, in former East Germany especially, a strong anti-migrant sentiment is growing among many people.

As a Pakistani-born security guard in his 50s at the Magdeburg migrants’ block told me this week: ‘I’m married to a German woman, but my children have dark skin like me.

‘They face racial prejudice in this part of eastern Germany every day. Foreigners are not popular and my job is to keep the new migrants safe.’

It was in this febrile atmosphere that the AFD mounted its successful campaign to capture voters’ support.

Andreas Roedder, contemporary history professor at Germany’s Mainz University, says the astonishing AFD election result marks the ‘normalisation of Right-wing populist movements’ in Germany for the first time since World War II.

Reflecting the changing mood there, too, a poll by newspaper Aftonbladet found nearly half of all Swedish women are scared to jog or to walk alone at night.

The growing xenophobia in modern Germany is manna from heaven to the AFD, founded by a group of academics as a fringe party in 2013 to protest not against immigration but Mrs Merkel’s handling of the Eurozone financial crisis and, in particular, her decision to bail out the teetering Greek economy.

Yet as the unending arrivals into Germany began to fray tempers, the AFD seized its moment. The party swept out the old guard, and last year made businesswoman Ms Petry, who founded a chemical manufacturing company, its leader.

The new politician on the block, who was brought up in the former Communist city of Dresden, soon steered the party rightwards and transformed herself into one of the most vocal — and dangerous — critics of Angela Merkel.

Almost immediately, she caused controversy with her comments about border police shooting migrants trying to enter the country illegally from Austria. ‘If necessary, they should use firearms,’ she told a regional newspaper. ‘I don’t want this, but the use of armed force is there as a last resort.’

Ms Petry, a mother-of-four whose marriage to a Lutheran pastor foundered recently when she began a relationship with an MEP from her party, unashamedly forged links with a controversial grassroots movement called Pegida — Patriotic Europeans Against the Islamisation of the West — which has run increasingly well-supported anti-migrant protests in east Germany demanding exactly the same as AFD: border controls and a halt to migration.

For now, AFD seems unstoppable, at least in this area of Germany. At the party’s offices in Magdeburg, local leader Andre Poggenburg, 40, wearing a brown designer suit and a broad smile, told me proudly: ‘We are a new party with fresh visions. The older parties are no longer respected and many Germans, particularly the young ones, think Mrs Merkel has gone crazy.

‘We view migration as a great problem for Germany. Migration must drop to zero immediately. The people will not tolerate so many bringing in the culture of Islam. They are worried about the migrants’ attitude to women after the sex assaults in Cologne and here in Magdeburg.

French President Francois Hollande shakes hand with German Chancellor Angela Merkel after a press conference during the 18th Franco-German cabinet meeting on Thursday

Syrian refugees arrive at the camp for refugees and migrants in Friedland, Germany earlier this month

‘We believe there is the likelihood of Islamic terrorists and jihadis being slipped into Germany because we have not vetted arrivals at the borders, so the Government has no idea who it is letting in.’

If this sounds like a xenophobic rant, it chimes exactly with the warnings of Hans-Georg Maassen, head of Germany’s domestic intelligence agency, who said recently that Islamic State is planting jihadists among migrants flowing into Europe.

This view was confirmed by Frontex, the EU border agency, two days ago in a worrying report, which said: ‘Islamist extremists will exploit . . . migration flows whenever such movements fit their plans.’

So how Right-wing is AFD? Before I leave, I put a piece of paper in front of Herr Poggenburg with a rectangle on it. I ask him to draw a line through it to describe where the party stands. He places it a little to the right of centre.

‘It is not true that we are Far Right, we are Middle Right,’ insists the politician, who no longer dares tell journalists about his family or where he lives because his home and car have been fire-bombed by Left-wing activists. Last Christmas, his dog was kidnapped and strangled with a piece of rope and its collar.

Not far away, I visited Leipzig (where opinion polls show a dramatic rise in AFD support), the home town of AFD leader Frauke Petry, where I met her close colleague and chairman of the city’s AFD, Siegbert Droese.

At his office, decorated with election posters, the 46-year-old told me: ‘In the past, Germans stayed at home on their sofas and didn’t bother to vote. This time they came out to the polls because they don’t like the migration policies of Mrs Merkel.’

In the past, Germans stayed at home on their sofas and didn’t bother to vote. This time they came out to the polls because they don’t like the migration policies of Mrs Merkel Siegbert Droese, chairman of AFD in Leipzig

What seems undisputable is that AFD is splitting opinion in Germany over the migrant crisis.

Herr Droese, a hotel owner with four children, said: ‘There is a wind of change here, particularly among the young. They see migrants sitting in camps or hostels with nothing to do but gaze at their phones or TV, and they think that’s not fair. Yet they know that under Mrs Merkel there will be at least 500,000 more migrants entering Germany this year.’

Meanwhile, the migrants at their housing block in Magdeburg, built, perhaps unthoughtfully, next to mixed-sex student accommodation, seemed unaware of the election results or the growing hostility to them among ordinary Germans.

When I explained the groundswell of support for AFD, Mahmood’s friend Piruz said: ‘There are lots of migrants here who are pretending to be sick so they can get free medical treatment.

‘One Indian woman brought her disabled son. He is taken by ambulance to special school or to hospital appointments every day, which costs money. This is the kind of thing that makes Germans worried about us.’

This former dental technician then added defensively — and revealingly — that few of the migrants at the hostel are genuine refugees.

‘Most of us could go home to our countries tomorrow if we wished. Why not? Many of the places we come from are not dangerous. I have no quarrel with the Iran regime, but wanted to work in the West. When Mrs Merkel said come over, I set off with everyone else; it was an opportunity for us.’

With the arrival of every new economic migrant like him — and with stories of rapes and the need for women-only train carriages — increasing numbers of Germans will grow more disenchanted, more angry.