He planned to stay on as prime minister until a new leader of the Liberal Party is chosen