Hamas has tried to portray Israel 's withdrawal as a militant victory .