If a people freely elects terrorism, they freely elect to be legitimate targets of war.
"If a people freely elects terrorism..."
I'm not sure they elected terrorism as much as they rejected the corruption and incompetence of Fatah. Admittedly their choice is not a great one, but I'm not sure there was a better option available.
There was a good piece on NRO today advancing the theory that Hamas did not actually want to win, just get a big enough minority to push the rest of the gov't around.