Germany's ruling coalition has agreed on a faster procedure for screening migrants at the border, dropping the idea of creating new holding centres.
The deal concerns irregular migrants already registered in another EU country, who are to be sent back.
Earlier Chancellor Angela Merkel's coalition was at risk of collapse as her interior minister, Horst Seehofer, wanted police to keep migrants out.
Migrants are to be screened within 48 hours at existing transit facilities, reports BBC.
Mr Seehofer told reporters he was "extremely satisfied" with the deal, despite having to drop his demand for new transit centres.
For weeks his dispute with Mrs Merkel threatened to break up the decades-old alliance between his conservative Bavarian CSU party and her Christian Democrats (CDU).
The deal requires irregular migrants to be processed at police facilities on the border if they cannot be transferred to Munich airport, and processed within 48 hours. They will remain in transit throughout, so legally not entering Germany.
A migrant proven to have registered in another EU country will be sent back, provided Germany has a corresponding agreement with that country.
Mrs Merkel says Greece and Spain are willing to take migrants back. However, Italy - the main arrival point for most migrants from North Africa - does not yet have a bilateral deal with Germany.
Currently the numbers of such migrants arriving at Bavaria's border with Austria are 10 or fewer daily, the German government says. Many more arrived daily in 2015-2016, when Mrs Merkel controversially allowed in more than a million asylum seekers.
© 2017 - All Rights with The Financial Express