Most analysts had expected Mr. Peres , a former prime minister , to retain his party 's leadership post .