On the A8 motorway between Salzburg and Munich, a policeman signals to a black BMW with Bulgarian number plates to pull over, and the driver parks and opens the boot. Five police officers, one armed with an assault rifle, ask him to remove its contents, and two female passengers dressed in leggings and flip-flops duly unload the bulging plastic bags inside and watch with increasing irritation as the police rifle through their contents. After about 10 minutes, having checked the Bulgarians’ documents, the police wave them on.

This is the Schwarzbach crossing between Austria and Germany, which the German federal police have been controlling since the late summer of 2015 when tens of thousands of refugees poured over the border. Pictures of the town’s bridge crammed with some of the thousands who arrived each day became one of the dramatic illustrations of the refugee crisis then playing out in Europe. Set up as a temporary border point near the town of Freilassing in Bavaria, the German government now has to reapply to the European commission every six months for the special permission required for it to continue to operate.

Freilassing is no longer a hub for refugees. Standing amid the bucolic surroundings of wooden farmhouses with overflowing flower boxes and solar-panelled roofs, Martin Zartner, a police spokesman, says the flow “has reduced to just a handful a day”. The town’s rather nondescript bridge is once again an unspectacular crossing over the river Saalach on which spot checks are only occasionally carried out. But it has become a potent focal point in the very public war being waged in Berlin between Angela Merkel and her interior minister Horst Seehofer, which could yet bring down the German government – ending both politicians’ careers – and drastically shake up Europe’s migration policy at the same time.

“We are fully aware of the tense political situation and the brutal eye which is being cast on the border controls,” one official who declined to be named, told the Observer. “This is after all about the future of Germany and the future of Europe.”

Seehofer, until recently prime minister of Bavaria and head of its ruling party, the Christian Social Union (CSU), sister party to Merkel’s Christian Democrats, wants to turn back from Germany’s borders any asylum seekers who have already registered in other EU countries. Merkel has firmly rejected his proposal, saying it is illegal under European law and that she fears the domino effect that turning asylum seekers back could have on the rest of the EU.

Facebook Twitter Pinterest Angela Merkel and her interior minister Horst Seehofer, who could bring down the German government. Photograph: Tobias Schwarz/AFP/Getty Images

As she fights for her political survival after almost 13 years in power, Merkel is scrambling to forge bilateral agreements with nine other EU leaders she is due to meet today before a crucial EU council summit this week. Her aim is to reach a deal palatable to both her and Seehofer. But that will be no easy task.

Sitting in the local headquarters of the anti-immigrant Alternative für Deutschland, where the windows are decorated with fairy lights in the party’s red and blue colours, Karl Halbritter is proudly dressed in traditional lederhosen shorts, an embroidered shirt and hiking boots and is rubbing his hands with glee. A candidate for the AfD in state elections in October at which he hopes to enter the district assembly, Halbritter points to a campaign poster: “The AfD makes good on what the CSU promises.”

The CSU was considered the outright ruler of Bavaria for decades, until the AfD stole thousands of voters from it at the federal election last autumn, entering the Bundestag for the first time and denting both the CSU’s pride and power. It is now threatening to do more damage to the CSU power base in October’s poll.

He calls the border restrictions that Seehofer is demanding, which would require thousands of extra police and a costly technical upgrade, a “placebo, pure entertainment”, which would be impossible to enforce.

“Any human trafficker with half a brain is not going to use the controlled border crossings, but take the neighbouring uncontrolled B-roads instead, or tell the people he is smuggling to get out of the car in Austria and cross the bridge at a time when everyone knows it’s not being controlled, and he’ll simply meet them on the other side,” he says.

If the AfD had its way, he says, it would simply close the EU’s entire outer border, instead of trying to police Germany’s 3,700km frontier.

Facebook Twitter Pinterest German police enforce border checks at the Austrian frontier. Photograph: Christof Stache/AFP/Getty Images

The mayor of Freilassing for the past 19 years, Josef Flatscher of the CSU, is nostalgic about the days when Bavaria last had a border with Austria, before the introduction of Schengen and the free movement of people and goods. “I grew up with the border and remember as a 10-year-old smuggling butter from Austria in the mid-1960s,” he says. He rejoiced when the borders disappeared, but says he can’t help but see their reintroduction three years ago as a necessity. “You’ll find few sensible people who don’t share that view,” he insists. “Of course it’s annoying for local people who like to pop over to Austria to the heuriger [wine taverns] or whose businesses benefit from Austrians coming to drink their coffee or buy groceries – all of which are cheaper here – but they will gladly alter their behaviour if it means they feel safer and don’t have the impression that Germany is a cash cow that has to feed the world.”

At the time of the refugee crisis Flatscher wrote to Merkel accusing her of having little regard for the impact her insistence on keeping Germany’s borders open had on the 17,000 citizens of Freilassing, many of whom took on the burden of coping with the 160,000 refugees who arrived in the town over six months.

His anger is by no means gone. “Merkel never once came here or got in touch to explain how she expected us to manage – we felt very much left in the lurch, and we still do,” he says.

There is also bitterness at how Freilassing is being used to fuel the far-right cause. “We’ve seen anti-immigrant demonstrations organised here where all the participants came from outside. The people of Freilassing played no role,” says Rainer Zehentner, a reporter at the local paper, the Südostbayerische Rundschau.

He resents the fear that he says has been fomented by both the AfD and CSU as well as newspapers like the tabloid Bild, which recently got a new, hardline editor.

“Hardly a day goes by when it doesn’t have a headline like “I’m a murderer and I want asylum in Germany”, so from the first feelings of humanity we had towards the refugees, people have been re-educated if you like, to believe they are all terrorists, murderers and rapists.”

Back at the border, two Macedonian-Germans who have been stopped by the police on their way back to Stuttgart show their irritation. “The police were friendly enough and tried to be as speedy as possible, even if they annoyed me by telling me to put out my cigarette,” says the driver, Alexander, a security guard, sipping from a can of Red Bull close to the end of an 18-hour trip. “But if this is what it takes to protect Germany, then so be it.”

Tina and Matthias Gabert, a medical receptionist and heating engineer from nearby Arzberg who have just pulled into a motorway service station just beyond the border crossing, say they switched to voting AfD at the last election “out of revenge” towards the CSU for its failure to control the borders. They would like to show their allegiance to the party once again “but the fact is we don’t feel safe,” they say. “Our girls are being grabbed from behind by refugees at the local swimming pool. It’s not surprising we like the border controls really. We can deal with the inconvenience.”

Additional reporting by Janek Schmidt

Angela Merkel has sought to downplay expectations for today’s emergency meeting on migration. The informal “mini-summit” for EU leaders in Brussels is being seen as a lifeline for the chancellor, amid a bitter dispute over refugee policy between her CDU party and its conservative sister party in Bavaria, the CSU. But after a row with Italy about the point of the meeting, Merkel said it was a “consultation” and would yield “no concluding statement”.

Italy’s prime minister, Giuseppe Conte, agreed to go to Brussels only after Merkel abandoned a set of pre-written conclusions. A pre-cooked summit communique that emerged last week angered Rome: Conte said it neglected the “emergency” of migrant arrivals in Italy.

Around 41,000 migrants travelled across the Mediterranean in the first six months of 2018. The arrival figures are 51% down on last year and 81% down on 2016. Hungary’s Viktor Orbán said he and leaders of three other central European states would boycott the meeting, although none had been expected to attend.