Hamas defeated Fatah’s forces, and though the group’s democratically elected lawmakers were expelled from the legislative council, it took control of the Gaza Strip while Fatah kept control of the West Bank.