Germany's ruling coalition agreed on a faster procedure for screening migrants at the border and has dropped 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.
Seehofer said that he was "extremely satisfied" with the deal, in spite of dropping his demand for new transit centres.