The former US president cited the two countries as examples of how “democracy can die at the ballot box”.