Germany and Italy have agreed in principle to stop illegal immigrants from traveling between the two countries, Germany’s interior minister said on Thursday, delivering on a compromise that ended a serious internal crisis in Chancellor Angela Merkel’s government earlier this year.