Afghan President Hamid Karzai called the election a defeat for terrorism .