It is both an American ally and a supporter of Hamas.