The authors analyse the 2010 mayoral election in the city of Medan, North Sumatra. Medan is an ethnically and religiously diverse city and the authors treat the elections here as a case study of inter-communal dynamics in local elections in plural regions of Indonesia. The first round of the vote was contested by 10 pairs of candidates and occurred in a climate of cross-ethnic alliance building and appeals that, the authors argue, are typical of broader Indonesian patterns. The second round confronted voters with a choice between a Muslim candidate and an ethnic Chinese candidate who was also a Buddhist. There was a sudden switch in the tone and themes of the contest. A concerted campaign was launched to convince Muslim voters to support the Muslim candidate, with politicians and religious leaders alike suggesting that it was a religious obligation to do so. The campaign proved effective and the Muslim candidate, a member of the province's established political elite, won by a large margin. The article focuses on the campaign teams' strategies, analysing their electoral calculations and the techniques used to appeal to a multi-ethnic constituency. It also considers the role played in the poll by Medan's rich array of ethnic associations. The authors conclude by pointing to lessons of the Medan case for wider patterns of ethnic coalition building in Indonesia. They also describe this election as an example of the 'identity switching' that can take place when political actors choose from multiple and overlapping identity categories in changing political contexts.