The blast occurred hours after a U.S.-backed militia announced that the Islamic State had been routed from its last patch of Syrian territory.