Angela Merkel and Bavarian Governor Horst Seehofer speak to the media at the annual conference of the CSU | Johannes Simon/Getty Merkel’s coalition ally threatens migration lawsuit Head of Bavarian conservatives steps up attack on chancellor’s refugee policy.

BERLIN — A simmering revolt in Angela Merkel’s coalition took a dramatic turn Tuesday as a key conservative ally threatened to contest the chancellor’s refugee policy in front of Germany’s constitutional court unless she agreed to change course.

Bavarian Premier Horst Seehofer, leader of the Christian Social Union (CSU), sister party to Merkel’s conservatives, made the threat in a letter sent to Merkel on Tuesday.

“This development can’t be allowed to continue,” said the letter, arguing that the federal government had a constitutional duty to protect Bavaria and other states from “uncontrolled” migration.

At a closed-door meeting of the conservative parliamentary bloc late Tuesday, Merkel urged solidarity, saying it was essential Berlin resolve the refugee challenge “without doing major damage to Europe.”

The chancellor’s calls to order have become routine in recent weeks as her allies have become increasingly restive. Merkel’s strategy rests on long-term fixes, such as a improving conditions for refugees in Turkey. The CSU, unnerved by a recent surge in support for the right-wing Alternative for Germany party, is pushing for a quick fix.

The letter marks a significant escalation of the dispute within the government over refugee policy and suggests that Merkel’s recent efforts to quell the uprising within the CSU have fallen flat.

While the CSU issued similar warnings in the past, Seehofer’s decision to put the threat in writing was seen as an affront that threatened the stability of the government.

“This is a declaration of a break with the coalition,” said Thomas Oppermann, parliamentary leader of the Social Democrats, who govern alongside the conservatives in a grand coalition. “One doesn’t write threatening letters in a coalition, one solves problems.”

Joachim Herrmann, a top CSU official and Bavarian interior minister, tried to calm the waters overnight, telling a late-night German news program that the party didn’t intend “to let the coalition collapse.” The party’s aim, he said, was “to accelerate decisions in Berlin that help our country.”

The CSU wants Merkel to cap the number of refugees allowed into Germany at 200,000 per year and impose strict border checks until the EU’s external frontiers are secure. Seehofer's letter also calls for the government to exercise its right to reject refugees arriving from other “safe” countries, including neighboring Austria.

The CSU’s campaign against Merkel’s course is unprecedented in a German government coalition.

Merkel visited Bavaria twice this month to meet with CSU leaders to convince them to support her own strategy, which is focused on a broader European solution, but failed to win over her detractors.

Indeed, Merkel’s refusal to back down from any aspect of her policy hardened the Bavarian opposition.

Constitutional experts differ on the prospects of a legal challenge to the government’s policy.

The more important question is whether the CSU will follow through with its threat, a step that would likely force it to leave the government coalition.

Such a move would lead to a major fissure within the conservative alliance, known as the “union,” a conservative coalition that has steered German politics for most of the postwar period.

Though Merkel’s Christian Democrats and the Social Democrats have enough seats in parliament to govern without the CSU, a more likely outcome might be to call early elections.

This article has been updated with additional details.