BERLIN — Chancellor Angela Merkel’s allies in Bavaria averted an immediate collision Monday with the German leader, giving her two weeks to make deals on migration with other European countries instead of turning them back unilaterally at Germany’s border.

In her fourth term at the helm of Europe’s largest economy, Merkel made it clear that she has no intention of being pushed around after an internal power struggle over immigration escalated into a threat to her government.

READ MORE: G7 summit with Donald Trump a ‘depressing’ experience, Angela Merkel says

She said she would report back July 1 on the results of her negotiations, and that as far as she’s concerned it’s not yet clear what will happen if there’s no European deal on the divisive topic.

Her interior minister, Horst Seehofer, has been calling for Germany to turn back migrants at the border who have previously applied for asylum or registered as asylum-seekers in other European countries. Merkel opposes such unilateral action, arguing that it would increase pressure on Mediterranean countries such as Italy and Greece and weaken the entire 28-nation European Union.

Story continues below advertisement

Seehofer heads the Bavaria-only Christian Social Union, the sister party to Merkel’s Christian Democratic Union. The CSU is determined to show that it’s tough on migration, arguing that this is the best way to cut support for the anti-migration, far-right Alternative for Germany party ahead of a challenging state election in Bavaria in October.

WATCH: Merkel says joint communique on trade coming from G7, but still gaps with U.S.

0:41 Merkel says joint communique on trade coming from G7, but still gaps with U.S. Merkel says joint communique on trade coming from G7, but still gaps with U.S.

A CSU leadership meeting Monday in Munich unanimously backed Seehofer’s plan to give Merkel until the end of the month to find a solution with other EU countries. That banished — if only for now — the specter of Seehofer pushing through his proposal in defiance of the chancellor, which would risk bringing down her government.

Asked in Berlin whether her government can work well until the end of its term in 2021 and whether she is still in full control, Merkel replied: “Yes to both.”

Story continues below advertisement

Merkel emphasized the need for Germany’s conservative parties to stick together, but she and Seehofer may only have delayed a head-on clash.

READ MORE: Angela Merkel shares photo of ‘spontaneous’ meeting with Donald Trump, G7 leaders

“It is in Germany’s interest to achieve the regulation of migration in a good partnership with our European neighbors,” Merkel said after her CDU’s leadership met. “We think that turning people back without consultation at our borders, as a country at the heart of Europe, could lead to negative domino effects that could also hurt Germany and ultimately lead to the questioning of European unity.”

Merkel said she will hold talks on bilateral agreements with other European countries at and around a June 28-29 EU summit. She said her party will consider the results on July 1 “and decide how to proceed in light of what has been achieved.”

There is, she insisted, “nothing automatic” about what happens next.

It wasn’t immediately clear what she might offer other countries in talks. Merkel said she will have to discuss “what is important for others; I can’t say today what that is.”

In Munich, Seehofer said his party would be happy to see European or bilateral solutions this month that “achieve the same that we can achieve by turning people back at the border.”

Story continues below advertisement

“We wish the chancellor success in this,” he said. “But we stand by our position that, if this does not succeed, turning people back immediately at the border must be possible.” Tweet This

Seehofer said he had told fellow leaders that “we’re not out of the woods yet.”

He said he would go ahead with preparations to block some asylum-seekers at the border. He said, if Merkel’s negotiations on getting other countries to take back migrants don’t bear fruit, he will talk with her party but “I want be able to put this into effect.”

WATCH: Germany’s Merkel braces for coalition tussle after vote

1:30 Germany’s Merkel braces for coalition tussle after vote Germany’s Merkel braces for coalition tussle after vote

The spat over immigration has laid bare the deep tensions in a fractious German government that took office only in March, after nearly six months of postelection haggling, and exposed the limits of Merkel’s authority. The two conservative parties govern Germany in a coalition with the center-left Social Democrats.

Story continues below advertisement

Seehofer and Merkel have long had an awkward relationship. In his previous job as Bavarian governor, Seehofer was one of the leading critics of Merkel’s decision in 2015 to leave Germany’s borders open as migrants streamed across the Balkans.

READ MORE: ‘We have a really great relationship’ — Trump hosts Germany’s Merkel at White House

Most first arrived in Bavaria, which borders Austria. More than 1 million migrants came to Germany in 2015 and 2016, though numbers have since dropped sharply.

In Brussels, the EU asylum office said Monday the number of people applying for international protection in Europe plunged last year but remains higher than before 2015, when more than one million migrants entered, many fleeing the war in Syria.

The office said 728,470 application requests were made for international protection in 2017, compared to almost 1.3 million applications the previous year. Around 30 percent came from conflict-torn countries such as Syria and Iraq.