Berlin (CNN) German Chancellor Angela Merkel's coalition government remains intact after she reached a deal Monday over the country's migration policy, ending a political standoff with her interior minister.

Horst Seehofer, the leader of the Christian Social Union, or CSU, the Bavarian sister party of Merkel's Christian Democrats, the CDU, was at a stalemate with Merkel over how the country should deal with asylum seekers arriving at the country's southern borders.

Seehofer offered to quit as interior minister and as leader of the CSU during a marathon party meeting on Sunday, but was later persuaded by CSU colleagues to meet with Merkel one more time and attempt to resolve the disagreement, Reuters reported.

Late Monday, general secretaries of both parties said Germany will establish transit centers close to the border with Austria where asylum seekers already registered in another European Union country will be processed before being returned to that country where possible. Where that is not possible, the parties have agreed the asylum seekers will be sent back across the border to Austria.

Merkel called the agreement a "good compromise after tough negotiations and difficult days." Returning migrants to the county where they first registered with the agreement of that nation preserved the EU's "spirit of partnership," Merkel said.