At first I thought it was the first vote cast gets priority. But that doesn't seem to be the case - I think it's randomize each time a player get's voted into a potential first place.
Eg, Steve has 5 cities. Then paul gets 5 cities (random who will be king). Steve gets a 6th city, then paul gets a 6th city (random who will be king). Only a guess based off of anecdote.