Hungary, which has become one of Europe's key entry points for migrants from Africa and the Middle East, has introduced draconian new migrant laws which it claims will usher in a "new era" in stemming the flow of illegal arrivals. But the biggest policy change is unfolding in Germany, where Chancellor Angela Merkel, who initially declared that her country is both open and willing to accept any number of asylum-seekers, is now scrambling to reimpose border controls after a furious backlash from the German public and lawmakers within her own ruling party.
The Hungarian government hoped that European Union (EU) home affairs ministers, who met for a special summit at the start of this week, would agree to a burden-sharing system allocating existing refugees between all the EU's member-states.
Since that has not happened, Hungary feels it has no other choice but to threaten people caught crossing the country's borders illegally with new criminal charges. The Hungarian army will also be ordered to start helping police and there is talk of a state of emergency, which will give the local authorities even greater powers.
But the Hungarian decision was influenced by recent developments in Germany.
For the first time in decades, Germany reintroduced early this week controls on its frontiers with Austria, a fellow EU-member state through which most migrants arrive. The German authorities reject accusations that they are backtracking on their open-door policy to refugees, claiming that they are merely seeking to reimpose some order in the process: "temporary border controls don't mean that the borders are being closed", German government spokesman Steffen Seibert said.
But there is no question that German politicians are reeling from their decision to accept all those who make it to their soil. This concession, which Germany did not have to make, may have earned Dr Merkel stardom status with pro-immigration activists throughout Europe and with the migrants themselves but it has also resulted in an influx of monumental proportions: the latest estimates are that up to one million asylum-seekers will be arriving this year.
The backlash against migrants is particularly strong in the former communist eastern parts of Germany, where the population is relatively homogenous, and the presence of foreigners still rare. However, the real burden is borne by Germany's western federal states, which are wealthier and far bigger.
And of particular concern is the southern German state of Bavaria, which under current internal German arrangements has to feed and permanently house 15 per cent of all new migrants.
Bavaria's ruling Christian Social Union (CSU), a sister party to Dr Merkel's Christian Democrats, has been a long-time critic of the Chancellor's immigration policies and has branded her decision to accept asylum seekers as an "unparalleled political error".
Leaders of Germany's other federal states also resent being taken by surprise by a move for which Dr Merkel gets all the political credit, while they pay the bills. Unease is shared among all politicians in the federal capital of Berlin, especially since the German media recently revealed that the initial decision to keep the borders open was not taken by government ministers, but by lower-level bureaucrats in Germany's Federal Office for Migration and Refugees, who wanted to cut the paperwork burden of deporting asylum seekers who had no right to be in Germany.
In effect, Germany stumbled into one of its most significant policy moves since the end of the Cold War through a bureaucratic accident, which Dr Merkel then claimed was her own decision.
The move to reinstate controls on the border with Austria was largely intended to send a signal to the German public and to neighbours that "the reception and sheltering of refugees cannot be a matter for us alone", as German Vice-Chancellor Sigmar Gabriel puts it.
The Hungarians have responded as the Germans wanted, by toughening their border controls, and the Austrians have followed suit. But the danger with this piecemeal approach is that it could result in the collapse of Europe's biggest achievement: the continent's open internal frontiers.
And it would be ironic that the main indirect culprit for this could be precisely the Germany which has otherwise been so magnanimous.