The prime minister says he won’t seek re-election as the ruling-party chief, clearing the way for a successor.