Qatar, which brokered the deal over the last month, confirmed it on Tuesday night, after its rough outline had been reported throughout the day.