in federal countries like germany the mayor can also be head of the government of a city state. the mayor of hamburg runs the government just like the minister president of bavaria runs the bavarian government. in some big cities such as tokyo the mayor is a governor.