An Israeli spokesman says Shaer was detained because he is a member of Hamas , which won Palestinian elections early this year but is considered a terrorist group by Israel , the United States and the European Union .