Fresh from knocking out the long-time mayor of Freiburg in south-west Germany in a surprise election victory, Martin Horn was celebrating his success when a man hit him in the face.
Mr Horn, a 33-year-old independent candidate, had his nose broken and a tooth knocked out in the attack, and had to be treated in hospital.
A man aged 54 was arrested and the attack is not being seen as political.
Defeated Green candidate Dieter Salomon was mayor of Freiburg for 16 years.
A university town, Freiburg has one of Germany’s youngest populations and Mr Horn campaigned on a platform of affordable housing to keep pace with growth.
He had just given a round of interviews after his election win and was celebrating with 300 supporters when he was approached by a man apparently seeking a selfie.
“Suddenly there was disturbance. The guy struck Martin Horn in the face,” local centre-left politician Julien Bender told German media.
More stories from Germany:
According to police investigating the unprovoked attack, the suspect has a background of psychiatric illness.
The victorious candidate went on Facebook to tell his supporters not to let the incident get them down.
“I have a broken nose, two small stitches and a broken tooth,” he said before returning to the party to enjoy his victory.
Expressing shock at he attack, the outgoing mayor wished his political rival a speedy recovery.