* Detail-light deal keeps Bavarians off Merkel's back
* Bavarian CSU fighting off far-right challenge
* CSU to make definitive decision on support on Sunday (Adds context)
By Thomas Escritt and Noah Barkin
BERLIN/BRUSSELS, June 29 (Reuters) - German Chancellor Angela Merkel appeared to have secured a temporary respite for her government with an early morning migration deal in Brussels that, while short on substance, looks to have mollified her restless Bavarian allies.
The deal reached by EU leaders in the small hours threw a lifeline to Merkel, whose government was brought to the brink of collapse by demands from Bavaria's Christian Social Union (CSU) for a tougher immigration policy.
Initial signs were that the arch-conservative CSU was grudgingly persuaded by a deal that even a bleary-eyed Merkel, emerging to talk to reporters at 5 a.m. (0300 GMT), admitted was more a sketch than a breakthrough.
While neither of her two principle adversaries - CSU head and interior minister Horst Seehofer, and Bavarian premier Markus Soeder - was prepared to concede immediately on Friday morning, other senior figures offered a cautious welcome.
"Something moved in the right direction in Europe," said senior lawmaker Hans Michelbach, noting that his party wanted to work with Merkel's Christian Democrats (CDU). "The alliance with the CDU has absolute priority," he told ARD television.
Seehofer and Merkel are due to discuss the outcome of the summit ahead of a meeting of CSU leaders planned for Sunday at which a definitive decision will be taken on whether to accept the Brussels deal and back down from a threat to tighten Bavarian border controls.
Carsten Nickel of Teneo Intelligence said Merkel had probably done "just enough" to prevent a full-blown showdown with the CSU on migration.
Were the party to follow through on its threats to reject migrants at the border that have already been registered in other EU states, Merkel would probably be forced to fire Seehofer as interior minister, triggering an almost certain collapse of her three-month-old government.
"The tactical goal remains to keep the issue simmering in some form until the 14 October Bavarian regional elections. German politics will likely remain noisy over the summer," Nickel added.
EU leaders agreed to share out refugees on a voluntary basis and create "controlled centres" inside the European Union to process asylum requests.
In her brief comments to the press in the early morning hours of Friday, Merkel laid out the details of the deal in typical measured, analytical style, not even hinting at the political stakes at home in Germany.
She acknowledged that the bloc still had "a lot of work to do to bridge the different views."
Soeder, who sees a hard line as essential to see off a challenge from the far-right ahead of October's Bavarian regional election, declined to be drawn on his view of the outcome.
"The summit is still going," he told reporters. "Let's wait until the end and then think it over," he added, although the migration component of the summit is indeed over.
Polls show the CSU's brinkmanship is relatively unpopular in Bavaria, save with one constituency: supporters of the anti-immigration Alternative for Germany (AfD) party, whose voters Soeder needs to win back.
When asked by pollsters Forsa last week what was the biggest problem facing Bavaria, 39 percent of citizens chose the CSU and only 30 percent refugees.
"The CSU has become a deeply un-Bavarian party," AfD spokesman Joerg Meuthen told Augsburger Allgemeine newspaper on Friday. "They are trying to correct for this by copying our positions."
Merkel has been under attack by the CSU in one form or another ever since she agreed to open the Bavarian border to a wave of refugees in September of 2015. She has survived the threats, including one by Seehofer to sue her government in Germany’s Constitutional Court, by refusing to rise to the bait.
By focusing obsessively on the substance of policy instead of the political jousting, she has often succeeded in making the CSU look petty and unreliable. Time will tell if the gambit will win her another respite. (Reporting by Thomas Escritt and Riham AlkousaaEditing by Andrea Shalal, Robin Pomeroy, William Maclean)