The talks were held in Qatar and run counter to long-standing US policy against direct contacts with terrorist groups.