The US confirmed it held direct talks with Hamas for the first time since 1997.