BERLIN — After years of cautious sparring, Angela Merkel’s standoff with her party’s Bavarian partners over refugee policy escalated into a bare-knuckled brawl on Thursday, threatening both the stability of Germany’s grand coalition and the conservative bloc that has been the bedrock of its political establishment for decades.

Merkel’s refusal to endorse a plan by her Bavarian interior minister to turn back some refugees at the German border set the stage for a showdown that, barring a last-minute compromise, could bring down her government.

“I consider illegal immigration to be one of the biggest challenges for the European Union and think that we therefore should not act unilaterally, without consultation and at the expense of third parties,” Merkel said Thursday at the end of a day packed with crisis meetings.

The dispute ostensibly revolves around the question of whether Germany should turn back refugees who have applied for asylum in other EU countries. Merkel opposes the policy on the grounds it could hasten the collapse of Europe’s system of open frontiers by forcing Germany’s neighbors to reimpose border controls.

The root of the dispute has less to do with that narrow question, however, than with Merkel’s broader refugee policy, which the CSU has resisted from the beginning.

The dispute has exposed deep fissures within the center-right bloc that will be difficult to repair as long as Merkel remains chancellor.

After a day of dramatic political theater, which included a rare suspension of a Bundestag session to allow the fractious coalition parties to regroup, the chancellor appeared to have secured the allegiance of her own Christian Democrats (CDU) in parliament. That came after a lengthy closed-door session that included an appeal from Bundestag President Wolfgang Schäuble, a longtime Merkel ally, on her behalf.

The sudden ferocity of the clash caught even Merkel’s own backbenchers by surprise. Though a number of them agree with the CSU’s position on asylum, they circled the wagons around the chancellor as soon as she looked threatened. Out of 50 MPs who spoke during the CDU meeting Thursday, only a handful criticized her.

Even as Merkel vowed to stand her ground, the leaders of the Bavarian Christian Social Union (CSU) dug in their own heels. Underscoring the deepening estrangement: The two parties, which normally caucus together, convened separately.

Given the high stakes, a collapse of the government remains unlikely. That said, even if the two groups manage to cobble together a compromise, the dispute has exposed deep fissures within the center-right bloc that will be difficult to repair as long as Merkel remains chancellor.

On the frontline

Bavaria, Germany’s southernmost state, has been the point of entry for most of the refugees who arrived in the country in recent years. As the influx intensified, CSU leaders prodded Merkel to enforce stricter border controls, going as far as threatening to petition Germany’s constitutional court to force her hand.

In the end, Merkel acquiesced, but the bad blood between the chancellor and CSU leader Horst Seehofer, who once called Merkel’s refugee policy a “capitulation,” remained.

Seehofer, who is now interior minister, demanded an “upper limit” on the number of refugees coming into Germany, a step Merkel long opposed. In order to secure the CSU's backing for a grand coalition with the Social Democrats in February, Merkel again backed down, accepting a soft limit of about 200,000.

Though refugee arrivals to Germany have fallen sharply ­— only 64,000 came through April — the CSU is once again asking for further concessions. That's because the party, which has ruled Bavaria almost without interruption since the war, faces a difficult state election in October, with polls predicting the CSU will lose its absolute majority.

Many Bavarians are frustrated with the federal government’s course on migration and have defected to the anti-immigrant Alternative for Germany (AfD).

Even outside of Bavaria, many Germans don’t trust Merkel to fix the refugee system. Though 64 percent of Germans approve of Merkel’s overall job performance, 53 percent say she hasn’t managed the refugee influx well, according to a poll released by German public television last week.

The poll data appear to have emboldened the CSU to pursue a direct confrontation with the chancellor.

Meanwhile about two-thirds of Germans agree with the CSU’s position on turning away refugees at the border, according to a separate poll released Thursday.

Masterplan to ruin

Though the CSU has consistently taken a harder line than Merkel’s CDU on refugee issues, it hasn’t escaped criticism for what opponents in Bavaria perceive to be an open-door policy on migration. The recent discovery of suspected corruption at a refugee center in Bremen and the alleged murder of a 14-year-old German girl at the hands of an Iraqi refugee last month have further inflamed passions.

Those cases and the poll data appear to have emboldened the CSU to pursue a direct confrontation with the chancellor.

Through it all, Merkel has insisted that the only real solution to the refugee question is a broader European approach, a call she repeated in a television interview on Sunday. But after three years of waiting for an EU solution to materialize, Seehofer has refused to back down.

Last Tuesday, Seehofer planned to unveil a “masterplan” to overhaul Germany’s asylum system. The blueprint includes 63 measures, including the option of turning back refugees at the border. Merkel refused to let him present the plan, arguing Berlin needed to await the outcome of the upcoming European summit at the end of June, where the asylum question will be on the agenda.

In an effort to defuse the tensions Thursday, Merkel offered a compromise: Until a European asylum system is in place, she would seek to conclude bilateral agreements with Italy and Greece to send back refugees who arrive in Germany.

Again, Seehofer and his party declined to back down, threatening to push forward with the policy after a CSU party vote on Monday. Such a course could leave Merkel with no choice but to fire Seehofer, a step that would almost certainly bring down the government.

“We have think about our own population and not just Europe,” Markus Söder, the powerful Bavarian premier, said on Thursday.

Germany first, but at a price

In rejecting Merkel’s call on the CSU to await the results of the EU summit, Söder argued that the best way to move the rest of Europe was for Germany to take the initiative.

“We have no trust or confidence that something can be achieved in two weeks that hasn’t been possible for three years,” he said.

What many observers see in the CSU’s hard line is a fairly transparent attempt to show its independence to Bavarian voters ahead of a state election in October.

If so, the tactic isn’t without risk.

If it relinquishes its link to the CDU, the CSU would lose a key aspect of its appeal in Bavaria, especially amongst centrist voters.

By openly challenging Merkel’s authority on a key policy, the CSU tacitly signaled a willingness to sacrifice both its longstanding alliance with the CDU and the grand coalition itself.

Despite recurring tensions and threats of divorce, the two conservative parties, collectively known as the "Union" in German, have collaborated without interruption throughout the post-war period. In the Bundestag, they form a single parliamentary group.

Though the CSU is a regional party, its partnership with the CDU gives it influence over national politics that a party its size wouldn't normally enjoy. It accounted for less than one-fifth of the conservative bloc’s total vote in last year’s election. Together, the parties won 33 percent of the electorate.

If it relinquishes its link to the CDU, the CSU would lose a key aspect of its appeal in Bavaria, especially amongst centrist voters. The CDU could also retaliate by entering Bavarian politics with its own candidates, further sapping the CSU’s hold on power there.

That threat to the CSU’s relevance is what some in the CDU believe will pull the party’s leadership back from the brink. If the CSU was to pull the plug on the coalition, possibly triggering a new election, it would expose itself to accusations of thrusting the country into political chaos. Germans just voted in September and it took about six months of difficult negotiations to form a government. Another trip to the polls is the last thing the population wants.

Given that the number of refugees has dwindled, the principle the CSU is fighting for — the right to turn back some asylum seekers at the border — is largely academic.

For one, the policy may only kick in once the 200,000 threshold is crossed. Even then, it would only apply to those refugees who had applied for asylum in another EU country, currently about 15 percent of the total.

In other words, in the current environment, the numbers are modest.

Malu Dreyer, the Social Democratic premier of Rhineland-Pfalz, called the CSU’s tactics “scandalous” in a television interview on Thursday.

“The CSU is risking a lot, namely the stability of this government,” she said.