BERLIN -- Those concerned about the future of Germany's ruling coalition and the possibility of a snap election can now breathe a sigh of relief. The coalition will remain in place after a lengthy row over migration threatened to weaken Europe's economic powerhouse.The number of asylum-seekers fleeing to Europe is back to pre-2015 levels, but the debate over migration has continued to create political turmoil, including a possible split in Germany's ruling coalition if a deal between her Christian Democrats and its sparring Bavarian sister party could not be reached.Late Monday evening, the row came to an end, with the two parties coming to a "clear agreement" on how to handle the topic of migration.Horst Seehofer, interior minister and the head of a political party long allied to Chancellor Angela Merkel's, threatened to resign on Sunday. But, on Monday evening, he backed down saying he would keep his post now that he had made a deal with the chancellor on how to handle asylum-seekers arriving in Germany from the Austrian border.Speaking to reporters, the chancellor said they had found a good compromise after "a hard struggle."On Sunday night, Seehofer said Merkel's EU-wide plan, hashed out in a meeting of European leaders last week, was as in his words, "insufficient." The two-day summit in Brussels resulted in leaders agreeing on measures that would make it more difficult for migrants to reach the European Union.Merkel and Seehofer, whose Christian Social Union party is based in Bavaria, have sparred over migration policy since 2015. The latest feud was seen by many as an attempt to strong-arm the chancellor into a stricter asylum policy.The new agreement promises "transit centers" on the German-Austrian border, where asylum-seekers who have previously registered in other EU countries will be sent back to those countries.The recent flare-up came even as the number of asylum-seekers coming to Europe has dipped to pre-2015 levels, according to the United Nations High Commissioner for Refugees.At the same time, however, Bavaria's state elections in October are on the horizon and will come after Seehofer's party lost votes to a more hard-line party against immigration , the anti-Islam Alternative for Germany, in last year's federal elections.Seehofer's "master plan" on migration centered around refusing entry to asylum-seekers who have previously registered in other EU countries, a move that his party likely hoped would win back supporters who turned to the Alternative for Germany. The "transit centers" introduced in the new agreement can be seen as a compromise.This debate between the sister parties in Germany's ruling coalition had been boiling for weeks. Seehofer gave the chancellor until Sunday night to come up with a restrictive migration policy that pleased his party. If his terms weren't met, he threatened to close the Bavarian border, a move he could enact as interior minister, although it would likely give the chancellor the right to dismiss him from his post.Leaders and lawmakers in Merkel's party, the Christian Democratic Union, on Monday afternoon stressed the importance of maintaining the seven-year conservative alliance between their party and Seehoefer's.Some in the governing coalition, like Foreign Minister Heiko Mass of the more liberal Social Democratic Party, have reacted to the spat with ire."I think the way in which this debate is being conducted is damaging not only Germany's image," he said on Monday, "but first and foremost its government."