German Chancellor Angela Merkel hammered out a last-minute deal to end a political standoff with her interior minister, Horst Seehofer, over the country's migration policy that threatened to collapse their coalition government.Seehofer, who is also the leader of Bavaria's Christian Social Union — which is closely linked to Merkel's Christian Democrats — had threatened to resign because the chancellor would not refuse entry to migrants who have asylum claims pending in other European Union countries.Merkel and the Christian Democrats adamantly opposed that approach, arguing it was imperative to involve other EU nations in devising an effective new migration policy.But after hours of tense negotiations, Seehofer emerged from talks saying he had reached a compromise with Merkel and that he would remain in his positions, The Associated Press reported."I am glad that this agreement has succeeded," he told reporters. "It once again proves it is worthwhile to fight for a conviction, and what has now been agreed is really a clear and very tenable agreement for the future."The two conservative parties agreed to build transit centers on the German side of the border with Austria. Asylum-seekers will be returned from those centers to other European countries where they first entered, if there are arrangements with those countries. They would be returned to Austria otherwise. But it's hardly a victory for Seehofer considering few of those arrangements exist, not even with Austria.Speaking to reporters, Merkel stressed that the compromise was in keeping with EU rules. "With this, the very spirit of partnership in the European Union is protected and at the same time, it is a decisive step towards organizing and managing secondary migration," Merkel said."That's exactly what was and is important to me. And that's why I think we've come up with a really good compromise today after tough negotiations and difficult days." Copyright 2018 NPR. To see more, visit http://www.npr.org/.