The deal, brokered by Egyptian and Qatari mediators with US backing, comes just days before the January 20 inauguration of President-elect Donald Trump, who had pressed for swift action