Berlin — German Chancellor Angela Merkel struggled on Thursday to find a compromise on migrant policy with her rebelling Bavarian allies, hoping to avert a crisis in her coalition just three months after it took power.

Merkel’s authority and the future of her alliance are at stake with Bavarian conservatives and Social Democrats at a time when divisions within Europe have come to a head over a ship carrying migrants that was refused entry to Italy.

The showdown with Interior Minister Horst Seehofer and his Bavarian Christian Social Union (CSU) is over his Masterplan for Migration, a blueprint in which he wants to show voters a new tough line before a difficult Bavarian election in October.

There was no immediate deal in sight after a “crisis meeting” on Thursday night. Parliamentarians from the CSU and Merkel’s Christian Democrats (CDU), which form a parliamentary bloc, held separate gatherings in a sign of the depth of the row.

The Augsburger Allgemeine newspaper quoted an unnamed senior CSU MP as saying the Bavarian party was considering leaving the parliamentary bloc.

Sources said many CDU MPs had backed a compromise proposal made by the chancellor.

However, CDU Health Minister and longtime Merkel critic Jens Spahn did not wholeheartedly support her idea and asked for MPs to be consulted, Spiegel Online reported.

Merkel objects to part of Seehofer’s plan, which allows German authorities to reject migrants who reach German borders, drawn by the country’s prosperity and stability, if they have already registered in other EU states to the south.

This would represent a reversal of her open-door policy for migrants from 2015, which has already been scaled back. She argues that doing this could result in other countries following suitThe open-door policy has been widely blamed for a surge in support for the far-right Alternative for Germany and its entry to parliament after elections in September.

“Merkel all alone!” wrote Bild daily on Thursday, reporting that support for her argument on this issue had all but evaporated within her conservative bloc.

Merkel told the CDU leadership on Thursday morning she had proposed that asylum seekers who had already been rejected by Germany could be turned back at the border.

She also wants time before a European Union summit on June 28-29 to agree bi- or trilateral deals with member states where migrants first register but then head to Germany.

The plan was enough win over some wavering CDU members.

“It is right to reject people who want to enter Germany a second time — Merkel has moved towards Seehofer,” Mike Mohring, a senior CDU member who had previously backed the CSU, said, adding he was ready to wait to get deals with other EU states.

However, hardline Bavarian state premier Markus Soeder showed little sign of backing down, insisting Germany must start rejecting migrants at its borders and it was pointless waiting for a European solution.

“It must now be decided and quickly,” said Soeder. “I believe that movement in Europe will only come if Germany clearly sets the tone and makes clear it can better protect its own borders,” he told German television.

Germany’s DPA news agency reported that Seehofer had told his party that he was prepared to defy Merkel if necessary and go ahead with his plans.

However, the SPD called on the conservative bloc to end its internal wrangling. “Staging such a drama to serve regional elections are not appropriate,” said SPD leader Andrea Nahles.