German Chancellor Angela Merkel and her Minister of Interior Horst Seehofer reached a deal Monday evening.

The minister and leader of the Christian Social Union (CSU) – Germany’s third junior coalition partner – had threatened with resignation.

The Chancellor agreed in setting up closed, “transition” centres for asylum seekers, near the border, where they will be detained while their application is processed.

This is a profound crisis that threatens the unity of the Christian Democrats (CDU) and their Bavarian sister party (CSU), for the first time since 1949. This crisis has not benefitted either Seehofer or the CSU, polls suggest. A recent poll suggests that if elections were to take place today, the CSU may not pass the 5% threshold to enter parliament.

Before this policy is adopted, it will require the consent of the Social Democrats (SPD).

The Alternative for Germany (AfD) has made significant gains during the last elections, at the expense of the Christian Democrats and the Social Democrats. The assumption is that the rise of the AfD is triggered by a surge in migration and asylum seekers in from 2015 to 2016.

Seehofer wanted Germany to impose checkpoints along the Bavarian border with Austria, coupled with bilateral deals that would allow pushbacks. The Chancellor resisted the idea of unilateral policies that would undermine an EU-migration management regime.